Skip to content

Commit

Permalink
feat(swan_r5):bootloader build (UF2_BOOTLOADER=2) does not set the IS…
Browse files Browse the repository at this point in the history
…R vector table.
  • Loading branch information
m-mcgowan committed Sep 30, 2021
1 parent 1c1eb49 commit e54073b
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions ports/stm/boards/system_stm32l4xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -221,10 +221,6 @@ const uint32_t MSIRangeTable[12] = {100000U, 200000U, 400000U, 800000U, 1
*/

void SystemInit(void) {
#if defined(USER_VECT_TAB_ADDRESS)
/* Configure the Vector Table location -------------------------------------*/
SCB->VTOR = VECT_TAB_BASE_ADDRESS | VECT_TAB_OFFSET;
#endif

/* FPU settings ------------------------------------------------------------*/
#if (__FPU_PRESENT == 1) && (__FPU_USED == 1)
Expand All @@ -249,6 +245,13 @@ void SystemInit(void) {

/* Disable all interrupts */
RCC->CIER = 0x00000000U;

#if !(BOARD_VTOR_DEFER) // only set VTOR if the bootloader hasn't already
#if defined(USER_VECT_TAB_ADDRESS)
/* Configure the Vector Table location -------------------------------------*/
SCB->VTOR = VECT_TAB_BASE_ADDRESS | VECT_TAB_OFFSET;
#endif
#endif
}

/**
Expand Down

0 comments on commit e54073b

Please sign in to comment.