This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Cortex-M3: What happen to the stack pointer (sp) when setting VTOR?

The first entry of the vector-table is the initial value for the stack-pointer.

I'm asking me, will the stack-pointer be changed when VTOR was set?

Thanks for any help! :-)

Parents
  • The Main stack pointer is loaded from the vector table by the processor at reset time only.

    Once out of reset, a subsequent change of the VTOR has no impact on the stack pointer, i.e. modifying the VTOR does not cause the stack pointer to be reloaded.

    Changing the VTOR causes any new exception to use the new value for the vector table base without requiring a reset.

    Best regards,

    Simon.

Reply
  • The Main stack pointer is loaded from the vector table by the processor at reset time only.

    Once out of reset, a subsequent change of the VTOR has no impact on the stack pointer, i.e. modifying the VTOR does not cause the stack pointer to be reloaded.

    Changing the VTOR causes any new exception to use the new value for the vector table base without requiring a reset.

    Best regards,

    Simon.

Children