teralytic / mbed-dev

Fork of mbed by teralytic

Revision:
43:e3d4af315dd8
Parent:
0:9b334a45a8ff
Child:
144:ef7eb2e8f9f7
diff -r 367d7b10ab62 -r e3d4af315dd8 targets/hal/TARGET_STM/TARGET_STM32F0/mbed_overrides.c
--- a/targets/hal/TARGET_STM/TARGET_STM32F0/mbed_overrides.c	Mon Jan 04 09:30:11 2016 +0000
+++ b/targets/hal/TARGET_STM/TARGET_STM32F0/mbed_overrides.c	Mon Jan 04 12:15:11 2016 +0000
@@ -27,23 +27,12 @@
  */
 #include "cmsis.h"
 
-extern int stdio_uart_inited;
-
 // This function is called after RAM initialization and before main.
 void mbed_sdk_init() {
-    /* Configure the Cube driver */
-    SystemCoreClock = 8000000; // At this stage the HSI is used as system clock
-
-    HAL_Init();
-
-    /* Configure the System clock source, PLL Multiplier and Divider factors,
-       AHB/APBx prescalers and Flash settings */
-    SetSysClock();
-
     // Update the SystemCoreClock variable.
     SystemCoreClockUpdate();
 
-    // reset serial next time it is called, now that system clock is set
-    stdio_uart_inited = 0;
+    // Need to restart HAL driver after the RAM is initialized
+    HAL_Init();
 
 }