Vector Table Offset Register behaviour
I'm using a STM32F401 that has its FLASH located at address 0x08000000.
I'm trying to use the Vector Table Offset Register. I need to put the Vector Table at address 0x0800C000.
My first question would be what do I need to put in VTOR?
0x0800C000 (absolute addres) or 0x0000C000 (offset from 0x08000000)
Second question:
The manual
https://developer.arm.com/documentation/ddi0439/b/System-Control/Register-summary?lang=en
gives the information about VTOR as:
address=0xE000ED08 reset value=0x00000000
When I reset the processor with STM32CubeIDE and place a breakpoint at the very beginning of the code:
Reset_Handler:
ldr sp, =_estack /* set stack pointer */
I can see through the SFRs window that the register has in fact value 0x00000000
However when I stop the program at main() the register value is now 0x08000000
So what is changing the VTOR between the ResetHandler and main()?
It must be said that the program works and it is using interrupts...
