armhub.dev
All tools

NVIC priority simulator.

Pick your implemented priority bits + PRIGROUP, add IRQs, see exactly how the byte gets split into preempt + sub-priority. The execution chain shows what would happen if everything fired at once; the matrix shows every pairwise preempt relationship.

NVIC configuration

Priority byte layout
7
6
5
4
3
2
1
0
preemptsubunused

IRQ sources

Priority decode

sorted: highest priority first
IRQPriority byteImplementedPreemptSubSeverity
TIM1_IRQ0x101 / 1510mid
USART2_IRQ0x404 / 1540low
EXTI0_IRQ0x404 / 1540low
SysTick0xF015 / 15150idle
PendSV0xF015 / 15150idle

If all IRQs pend simultaneously

execution order ↓
  1. preempt 1
    runs to completion
    • 1.TIM1_IRQ(sub 0)
  2. preempt 4 · 2 co-pending
    serialised by sub-priority
    • 1.USART2_IRQ(sub 0)
    • 2.EXTI0_IRQ(sub 0)
  3. preempt 15 · 2 co-pending
    serialised by sub-priority
    • 1.SysTick(sub 0)
    • 2.PendSV(sub 0)
IRQs at the same preempt level can't preempt each other — whichever fires first runs to completion. Sub-priority only breaks the tie when they pend simultaneously.

Preemption matrix

Read as: "if row is currently running, can column preempt it?"

TIM1_IRQUSART2_IRQEXTI0_IRQSysTickPendSV
TIM1_IRQ—nononono
USART2_IRQyes—nonono
EXTI0_IRQyesno—nono
SysTickyesyesyes—no
PendSVyesyesyesno—