IT lexicon › Hardware › Interrupt priority grouping

Interrupt priority grouping

Hardware På svenska → Updated: 2026-11-04

Splitting an interrupt's priority bits into one part that decides who may interrupt whom, and another that only decides queue order.

On Cortex-M3 and later, the PRIGROUP field in the AIRCR register sets the dividing line. The upper bits are the preemption priority, and only they decide whether one interrupt can barge into another. The lower bits are the subpriority, consulted only when two interrupts at the same preemption level are pending at once. Two interrupts differing only in subpriority can therefore never nest.

This produces a familiar debugging session in which someone lowers an interrupt's subpriority and is puzzled that it still won't preempt. FreeRTOS requires all bits to be assigned to preemption for exactly this reason — on STM32, all four that exist. Cortex-M0 has no grouping at all, which for once makes the simpler core the less confusing one.

← Back to the lexicon