Vector Table should accordng to application offset

pull/11888/head
fred.li 2019-06-03 18:36:50 +08:00
parent 0c8196168a
commit ee2f7ce6bb
1 changed files with 2 additions and 1 deletions

View File

@ -173,7 +173,8 @@ void SystemInit (void)
#if ((__FPU_PRESENT == 1) && (__FPU_USED == 1))
SCB->CPACR |= ((3UL << 10*2) | (3UL << 11*2)); /* set CP10, CP11 Full Access */
#endif /* ((__FPU_PRESENT == 1) && (__FPU_USED == 1)) */
SCB->VTOR = RDA_CODE_BASE; /* vector table in flash */
//SCB->VTOR = RDA_CODE_BASE; /* vector table in flash */
SCB->VTOR = APPLICATION_ADDR;
NVIC_SetPriorityGrouping(0x06); /* 1 bit for pre-emption pri */
__enable_irq();