- This topic has 0 replies, 1 voice, and was last updated 5 years, 7 months ago by .
Viewing 1 post (of 1 total)
Viewing 1 post (of 1 total)
- You must be logged in to reply to this topic.
Home › Forums › Mastering STM32 book support forum › Stack Initialization
Hello Carmine,
I’m Michele, and I purchased yesterday your book. I have little experience with STM32 and ARM Cortex-M and after a quick look I found your book very nice written, covering topics which are otherwise hard to find somewhere else.
Going straight to the question. Regarding the startup sequence you point out that stack pointer is initialized in the Reset_Handler of the file startup_stm32fxxxxx.s with the line
ldr sp, =_estack
Why is this needed? I mean the processor already fetches automatically the value _estack in sp register, during the startup sequence (this is a particularity of the ARM Cortex-M), so why has it to be done once more via software?
thanks a lot