mirror of https://github.com/ARMmbed/mbed-os.git
Fix VTOR bug when using bootloader on STM32WB
The address of the vector table is hardcoded to the start of flash in many, if not all, ST targets. This causes a crash in applications that are using a bootloader. This patch updates the board STM32WB55 so it properly handle updating the VTOR with a bootloader. Solution has been copied from the PR #3798.pull/12958/head
parent
a707fd133e
commit
a4c692bd41
|
@ -196,7 +196,8 @@ void SystemInit(void)
|
||||||
/* program in SRAMx */
|
/* program in SRAMx */
|
||||||
SCB->VTOR = VECT_TAB_BASE_ADDRESS | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAMx for CPU1 */
|
SCB->VTOR = VECT_TAB_BASE_ADDRESS | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAMx for CPU1 */
|
||||||
#else /* program in FLASH */
|
#else /* program in FLASH */
|
||||||
SCB->VTOR = VECT_TAB_OFFSET; /* Vector Table Relocation in Internal FLASH */
|
#include "nvic_addr.h" // MBED
|
||||||
|
SCB->VTOR = NVIC_FLASH_VECTOR_ADDRESS; // MBED
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* FPU settings ------------------------------------------------------------*/
|
/* FPU settings ------------------------------------------------------------*/
|
||||||
|
|
Loading…
Reference in New Issue