Understanding __disable_irq() and __enable_irq() Intrinsic Functions in ARM Cortex-M
The article explains that __disable_irq() and __enable_irq() are compiler‑provided intrinsics that expand to CPSID i and CPSIE i instructions, return the prior PRIMASK state, globally mask CPU interrupt handling without stopping hardware events, and contrasts them with CMSIS __NVIC_DisableIRQ/EnableIRQ which control individual interrupt lines.