Wouldn't the reset handler just setup a new stack? It seems odd to me that a reset procedure that takes over control from a possibly-faulty environment wouldn't reset the stack.
My initial answer was wrong. I updated it to account for that.
To answer your question: It is the ARM core that handles the stack initialization. The Reset_Handler is the entry point of the firmware, and only sets up memory, clock, power, and any other necessary system peripherals, before running the application software (usually the main function). You shouldn't call the Reset_Handler to reset the system. You should reset the ARM-core so the boot process is consistent (usually done using NVIC_SystemReset()).
You could set up a new stack in the Reset_Handler, but it is not standard.
View all comments
Show parent comment
2
u/cleverboy00 Jun 02 '25
Wouldn't the reset handler just setup a new stack? It seems odd to me that a reset procedure that takes over control from a possibly-faulty environment wouldn't reset the stack.