From 72be0510881195a80eb5ce67e147e1a66c57b7e6 Mon Sep 17 00:00:00 2001 From: bcostm Date: Mon, 26 Jun 2017 19:04:44 +0200 Subject: [PATCH] DISCO_L475VG_IOT01A: Update system init for cmsis5 --- .../TARGET_DISCO_L475VG_IOT01A/system_stm32l4xx.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L475xG/TARGET_DISCO_L475VG_IOT01A/system_stm32l4xx.c b/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L475xG/TARGET_DISCO_L475VG_IOT01A/system_stm32l4xx.c index 1622015733..0be2e9c3ec 100644 --- a/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L475xG/TARGET_DISCO_L475VG_IOT01A/system_stm32l4xx.c +++ b/targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L475xG/TARGET_DISCO_L475VG_IOT01A/system_stm32l4xx.c @@ -83,7 +83,7 @@ */ #include "stm32l4xx.h" -#include "hal_tick.h" +#include "nvic_addr.h" #if !defined (HSE_VALUE) #define HSE_VALUE ((uint32_t)8000000) /*!< Value of the External oscillator in Hz */ @@ -215,20 +215,9 @@ void SystemInit(void) #ifdef VECT_TAB_SRAM SCB->VTOR = SRAM_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM */ #else - SCB->VTOR = FLASH_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal FLASH */ + SCB->VTOR = NVIC_FLASH_VECTOR_ADDRESS; /* Vector Table Relocation in Internal FLASH */ #endif - /* Configure the Cube driver */ - SystemCoreClock = MSI_VALUE; // At this stage the MSI is used as system clock - 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; } /**