Mbed for VNG board
Fork of mbed-src by
Diff: targets/cmsis/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F072RB/system_stm32f0xx.c
- Revision:
- 431:255afbe6270c
- Parent:
- 392:2b59412bb664
--- a/targets/cmsis/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F072RB/system_stm32f0xx.c Tue Dec 09 14:30:09 2014 +0000 +++ b/targets/cmsis/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F072RB/system_stm32f0xx.c Tue Dec 09 14:45:08 2014 +0000 @@ -82,6 +82,7 @@ */ #include "stm32f0xx.h" +#include "hal_tick.h" /** * @} @@ -159,6 +160,8 @@ * @{ */ +extern int NVIC_vtor_remap; + /** * @brief Setup the microcontroller system. * Initialize the default HSI clock source, vector table location and the PLL configuration is reset. @@ -209,11 +212,17 @@ RCC->CIR = 0x00000000; /* Configure the Cube driver */ + SystemCoreClock = 8000000; // At this stage the HSI is used as system clock + NVIC_vtor_remap = 0; // Because it is not cleared the first time we enter in NVIC_SetVector() HAL_Init(); /* Configure the System clock source, PLL Multiplier and Divider factors, AHB/APBx prescalers and Flash settings */ SetSysClock(); + + /* Reset the timer to avoid issues after the RAM initialization */ + TIM_MST_RESET_ON; + TIM_MST_RESET_OFF; } /** @@ -421,12 +430,6 @@ return 1; // OK } -/* Used for the different timeouts in the HAL */ -void SysTick_Handler(void) -{ - HAL_IncTick(); -} - /** * @} */