Introduction: Why This Post Exists

Interrupt handling on ARM Cortex-Mx looks simple on paper, but becomes confusing the moment you open a debugger. You see:

  • PC value changes mysteriously
  • registers appearing in stack memory
  • LR holding strange values like 0xFFFFFFFD
  • and some registers never showing up on the stack

This post breaks down what the hardware actually does, what the compiler does, and what the debugger hides, using real debugging screenshots and memory inspection.

ARM Cortex-M Exception Model

Before diving into stack dumps and registers, it’s important to understand one thing: On Cortex-Mx, exception entry and exit are largely hardware-controlled. The CPU:

  • decides when an interrupt is taken
  • saves a fixed architectural context
  • switches modes and s…

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help