Skip to main content
1 of 2
Colin
  • 4.6k
  • 2
  • 21
  • 33

R14 (LR) doesn't contain the address to return to when exiting an exception (as you have found) instead it contains information about whether to return to handler or thread mode, which stack pointer to use (msp or psp), and whether it's a floating point context.

This is detailed in the section about Exception entry and exit in the Arm Cortex M4 generic user guide, page 2-2 8.

Colin
  • 4.6k
  • 2
  • 21
  • 33