diff --git a/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32F0/TARGET_DISCO_F051R8/system_stm32f0xx.c b/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32F0/TARGET_DISCO_F051R8/system_stm32f0xx.c index 9a36080acb7..bfeeedaf117 100644 --- a/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32F0/TARGET_DISCO_F051R8/system_stm32f0xx.c +++ b/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32F0/TARGET_DISCO_F051R8/system_stm32f0xx.c @@ -226,6 +226,9 @@ void SystemInit(void) /* Disable all interrupts */ RCC->CIR = 0x00000000; + /* Enable SYSCFGENR in APB2EN, needed for 1st call of NVIC_SetVector, to copy vectors from flash to ram */ + RCC->APB2ENR |= RCC_APB2ENR_SYSCFGEN; + /* Configure the Cube driver */ SystemCoreClock = 8000000; // At this stage the HSI is used as system clock HAL_Init(); diff --git a/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F030R8/system_stm32f0xx.c b/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F030R8/system_stm32f0xx.c index b666a3eabef..78b5f25f03a 100644 --- a/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F030R8/system_stm32f0xx.c +++ b/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F030R8/system_stm32f0xx.c @@ -227,6 +227,9 @@ void SystemInit(void) /* Disable all interrupts */ RCC->CIR = 0x00000000; + /* Enable SYSCFGENR in APB2EN, needed for 1st call of NVIC_SetVector, to copy vectors from flash to ram */ + RCC->APB2ENR |= RCC_APB2ENR_SYSCFGEN; + /* Configure the Cube driver */ SystemCoreClock = 8000000; // At this stage the HSI is used as system clock HAL_Init(); diff --git a/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F031K6/system_stm32f0xx.c b/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F031K6/system_stm32f0xx.c index 417c29dec45..bbf882f64ba 100644 --- a/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F031K6/system_stm32f0xx.c +++ b/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F031K6/system_stm32f0xx.c @@ -227,6 +227,9 @@ void SystemInit(void) /* Disable all interrupts */ RCC->CIR = 0x00000000; + /* Enable SYSCFGENR in APB2EN, needed for 1st call of NVIC_SetVector, to copy vectors from flash to ram */ + RCC->APB2ENR |= RCC_APB2ENR_SYSCFGEN; + /* Configure the Cube driver */ SystemCoreClock = 8000000; // At this stage the HSI is used as system clock HAL_Init(); diff --git a/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F042K6/system_stm32f0xx.c b/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F042K6/system_stm32f0xx.c index 489d6b73e46..cca9238c937 100644 --- a/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F042K6/system_stm32f0xx.c +++ b/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F042K6/system_stm32f0xx.c @@ -227,6 +227,9 @@ void SystemInit(void) /* Disable all interrupts */ RCC->CIR = 0x00000000; + /* Enable SYSCFGENR in APB2EN, needed for 1st call of NVIC_SetVector, to copy vectors from flash to ram */ + RCC->APB2ENR |= RCC_APB2ENR_SYSCFGEN; + /* Configure the Cube driver */ SystemCoreClock = 8000000; // At this stage the HSI is used as system clock HAL_Init(); diff --git a/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F070RB/system_stm32f0xx.c b/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F070RB/system_stm32f0xx.c index 35751346468..93bc0c57183 100644 --- a/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F070RB/system_stm32f0xx.c +++ b/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F070RB/system_stm32f0xx.c @@ -227,6 +227,9 @@ void SystemInit(void) /* Disable all interrupts */ RCC->CIR = 0x00000000; + /* Enable SYSCFGENR in APB2EN, needed for 1st call of NVIC_SetVector, to copy vectors from flash to ram */ + RCC->APB2ENR |= RCC_APB2ENR_SYSCFGEN; + /* Configure the Cube driver */ SystemCoreClock = 8000000; // At this stage the HSI is used as system clock HAL_Init(); diff --git a/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F072RB/system_stm32f0xx.c b/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F072RB/system_stm32f0xx.c index e307fc20fb7..fc7ee5c40e3 100644 --- a/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F072RB/system_stm32f0xx.c +++ b/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F072RB/system_stm32f0xx.c @@ -226,6 +226,9 @@ void SystemInit(void) /* Disable all interrupts */ RCC->CIR = 0x00000000; + /* Enable SYSCFGENR in APB2EN, needed for 1st call of NVIC_SetVector, to copy vectors from flash to ram */ + RCC->APB2ENR |= RCC_APB2ENR_SYSCFGEN; + /* Configure the Cube driver */ SystemCoreClock = 8000000; // At this stage the HSI is used as system clock HAL_Init(); diff --git a/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F091RC/system_stm32f0xx.c b/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F091RC/system_stm32f0xx.c index 4c50e4399ac..df1b7c453d9 100644 --- a/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F091RC/system_stm32f0xx.c +++ b/libraries/mbed/targets/cmsis/TARGET_STM/TARGET_STM32F0/TARGET_NUCLEO_F091RC/system_stm32f0xx.c @@ -226,6 +226,9 @@ void SystemInit(void) /* Disable all interrupts */ RCC->CIR = 0x00000000; + /* Enable SYSCFGENR in APB2EN, needed for 1st call of NVIC_SetVector, to copy vectors from flash to ram */ + RCC->APB2ENR |= RCC_APB2ENR_SYSCFGEN; + /* Configure the Cube driver */ SystemCoreClock = 8000000; // At this stage the HSI is used as system clock HAL_Init();