Stack limit registers (MSPLIM/PSPLIM)
Two ARMv8-M registers that say how far down a stack may grow — and fault the instant it tries to go further.
Without an MMU a microcontroller has no guard page beneath its stack. An overflow silently tramples whatever variables happen to live below, and the symptom shows up much later somewhere unrelated. The old remedies were stack painting, canaries or sacrificing an MPU region as a guard zone — after-the-fact measurement or wasted resources, take your pick.
ARMv8-M, announced in 2015 and used in the Cortex-M33 and M55 among others, added MSPLIM and PSPLIM: one limit per stack pointer. If the pointer drops below its limit the instruction is aborted and a UsageFault with the STKOF flag is raised before anything gets overwritten. An RTOS rewrites PSPLIM on every context switch so each task gets its own limit. It is such an obvious feature that the surprising part is that it took eleven years after the Cortex-M3.