Nested Vectored Interrupt Controller (NVIC)

Computer Engineering

How It Works

A Nested Vectored Interrupt Controller (NVIC) arbitrates asynchronous exception requests generated by peripheral hardware timers, communications buses, and physical sensors. When multiple interrupt lines (IRQs) assert concurrently, priority arbitration hardware selects the highest-priority request, preempts active thread execution if prioritized, and automatically vectors processor execution to the designated Interrupt Service Routine (ISR) address. Hardware-accelerated stack frame preservation ensures bounded, deterministic context switching latency.

Governing Equation
Priority = (Preemption Level ≪ Subpriority Bits) | Subpriority , t_{latency} = t_{jitter} + t_{push}