I want to know the return address from Interrupt in STM32F, especially arm processor.
In normal function, return address is saved in Link Register, but in interrupt, I found that the value of Link Register is 0xFFFFFF9.
So I found the Ref. manual of armv6, but I still don't know where the return address is saved.
enter image description here enter image description here
I attached part of the Ref. Manual.
I guessed that ReturnAddress(ExceptionType); is the place where the return address is saved.
So I checked [SP, #24] but the value was not the return address.
It is all documented, all you have to do is try it.
dumping the stack
from arm docs
compiled svcall has a stack frame
covering the first part of the stack
then the exception portion of the stack that the logic uses.
and that is the expected return address.
Not sure why you would care what the return address is. Note that that is not the address you would branch nor return to (as documented) it would be 800005f in this case, of course. But you would also have to restore the registers manually (r0,1,2,...) if you want to return to that address.