We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi,
I'm pretty new to ARM processor and STM32 microcontroller, so my question is very basic.
In the startup file for a SW4STM32 project (eg startup_stm32f446xx.s) the stack pointer is set in Reset_Handler with the line
ldr sp, =_estack /* set stack pointer */
why is this needed? I mean as far as I know the ARM Cortex-M is fetching automatically the value of the stack pointer as first step during the booting sequence. Why has it to be done a second time via software? I looks like it is initialized twice to the same value (_estack) since the vector table has the form:
.word _estack
.word Reset_Handler
.