Friday , 10 July 2020
iten

Stack Initialization


Viewing 1 post (of 1 total)
  • Author
    Posts
  • #11678
    michele78
    Participant

    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


Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.