Hello experts,
I would like to ask the reason why the exception frame forms on PSP in the Cortex-M architecture.My understanding is that MSP (Main Stack Pointer) is the interrupt stack pointer and PSP (Porcess Stack Pointer) is the normal (user) stack pointer.From my little experiences, the exception frame was formed on the interrupt stack.However, the ARM forms it on the user stack.
Best regards,Yasuhiko Kouoto.
Hello,
I have just found out another reason.
It would be why a function could not be distinguished whether it was an ISR or a normal function.
Therefore a Compiler would compile it in the same manner.
However, in an ISR, all registers should kept their values which had been before entering it.
So the caller saved registers such as r0-r3, r12, lr and pc should be saved onto the user stack.
Probably it would be a correct answer.
Also I would close this issue because there has been no further posts while 3 months.
Best regards,
Yasuhiko Koumoto.