Skip to main content

Subsection 8.3.5 What Gets Stacked

The pre-class video describes interrupt entry as hardware saving “the machine state.” The exact contents, for readers who want them: on the Cortex-M0+, exception entry pushes a fixed eight-word frame (R0–R3, R12, LR, PC, and xPSR, 32 bytes) onto the stack, automatically and unconditionally, with no compiler involvement (Arm Cortex-M0+ Devices Generic User Guide, “Exception entry and return”). That fixed, hardware-mandated frame is what distinguishes an interrupt from an ordinary function call, where the compiler decides which registers the function’s own entry code must save. Any other registers an ISR uses are saved by the ISR’s own compiler-generated code, exactly as in any function.