2 Replies Latest reply on Jun 23, 2019 8:07 AM by EnSi_1099366

    PSoC5LP: right way to save value of Stack Pointer (r13) register




      I am learning to use ARM MCUs and I want to make a stack monitor. I managed with filling it, monitor it ecc, but I want to start to fill it from a proper unused location without knowing the r13 value in debug. So I just need to implement a way to store the r13 somewhere in the code and using it later. So far I was visually checking the content of r13 in debug and adjusting the code accordingly.


      What is the right way of storing locally the content of SP (r13) register in a ARM Cortex M3?


      Thank you,