SCB->VTOR = FLASH_BASE | VECT_TAB_OFFSET;
I configured a nucleato-L152RE LED program using CubeMX6.17+STM32L1 Firmware Package V1.10.6 and found that the program kept restarting automatically. After adding the following code to the SystemInit() function generated by CubeMX, the problem was solved. What is the reason for this? And my other projects never need to include this line of code, such as F103, F411, G431, L051, and so on.
SCB->VTOR = FLASH_BASE | VECT_TAB_OFFSET;
