Skip to content

Commit 72be051

Browse files
committed
DISCO_L475VG_IOT01A: Update system init for cmsis5
1 parent bd6d738 commit 72be051

File tree

1 file changed

+2
-13
lines changed
  • targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L475xG/TARGET_DISCO_L475VG_IOT01A

1 file changed

+2
-13
lines changed

targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L475xG/TARGET_DISCO_L475VG_IOT01A/system_stm32l4xx.c

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
*/
8484

8585
#include "stm32l4xx.h"
86-
#include "hal_tick.h"
86+
#include "nvic_addr.h"
8787

8888
#if !defined (HSE_VALUE)
8989
#define HSE_VALUE ((uint32_t)8000000) /*!< Value of the External oscillator in Hz */
@@ -215,20 +215,9 @@ void SystemInit(void)
215215
#ifdef VECT_TAB_SRAM
216216
SCB->VTOR = SRAM_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM */
217217
#else
218-
SCB->VTOR = FLASH_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal FLASH */
218+
SCB->VTOR = NVIC_FLASH_VECTOR_ADDRESS; /* Vector Table Relocation in Internal FLASH */
219219
#endif
220220

221-
/* Configure the Cube driver */
222-
SystemCoreClock = MSI_VALUE; // At this stage the MSI is used as system clock
223-
HAL_Init();
224-
225-
/* Configure the System clock source, PLL Multiplier and Divider factors,
226-
AHB/APBx prescalers and Flash settings */
227-
SetSysClock();
228-
229-
/* Reset the timer to avoid issues after the RAM initialization */
230-
TIM_MST_RESET_ON;
231-
TIM_MST_RESET_OFF;
232221
}
233222

234223
/**

0 commit comments

Comments
 (0)