Sleep-on-exit
A Cortex-M setting that sends the processor straight back to sleep when the last interrupt handler finishes, never returning to the main program.
With the SLEEPONEXIT bit set in the System Control Register, the core doesn't unstack the saved exception frame and resume main() on leaving handler mode — it simply goes to sleep. The next interrupt can then start without stacking the frame again, because it's already there. That saves cycles and energy on every wake-up.
The result is a fully interrupt-driven firmware: main() initialises the peripherals, sets the bit, executes a single WFI and never runs another line. All the work happens in interrupt handlers. It's the opposite of a superloop, and as elegant as it is baffling to anyone hunting for the program's main loop.