Meaning
A hardware and firmware timing metric measures the exact duration elapsed between the physical assertion of an interrupt request line and the execution of the first instruction in the corresponding service routine. In connected embedded systems, interrupt latency dictates how rapidly a microcontroller responds to external hardware triggers such as radio packet reception, sensor thresholds, or power rail faults. The metric terminates its measurement scope when the central processor enters the dedicated handler, excluding the subsequent processing duration of the service routine itself.
Context Preservation
Incoming hardware trigger signals force the processing core to suspend standard thread execution and save its operational state. The central processing unit pushes program counters, status registers, and active accumulator values onto the system stack before branching to the interrupt vector table. Hardware architectures with automated register stacking reduce the cycle count required to achieve full context preservation during this transition phase.
Pipeline Execution
Total response time combines hardware signal propagation, processor instruction pipeline flushing, and memory fetch delays. If the core is executing a non-interruptible multi-cycle instruction when the request line goes high, interrupt latency extends until that instruction completes its write-back phase. Nested interrupt controllers evaluate priority levels, inserting additional arbitration cycles when multiple peripheral lines assert simultaneously.
High-priority triggers immediately preempt lower-priority routines, vectoring the processor directly to critical safety or communication handlers. Memory architectures introduce variable latency based on whether the interrupt vector table and service instructions reside in zero-wait-state internal static memory or external flash storage. Cache misses during the initial instruction fetch phase add unpredictable wait states to the total measured duration.
Hardware Variance
System-level configuration choices directly alter minimum and maximum response intervals across production board revisions. Operating systems that disable global interrupts during critical kernel updates introduce jitter, creating wide spreads between nominal and worst-case interrupt latency. Designers measure this variance using logic analyzers connected to dedicated debug pins toggled at interrupt entry.
Verifying worst-case response timing ensures compliance with strict industrial communication bus deadlines and hardware safety specifications.