Interrupt Latency Calculator
Work out interrupt latency instantly with clear inputs, formula shown and shareable results.
About Interrupt Latency Calculator
Worst-case interrupt latency is hardware entry time plus the longest uninterruptible instruction plus the longest section where interrupts are disabled. That last term is usually the dominant one and is entirely under the programmer's control, which is why critical sections must be kept short.
Formula
Interrupt latency
latency = (entry cycles + longest instruction + longest disabled section) / clock frequency
Worked example
With the default values below, Interrupt Latency Calculator returns Worst-case latency of 0.83. Change any input above and every figure here is recalculated in your browser.
Inputs used
- Clock frequency
- 72 MHz
- Interrupt entry cycles
- 12 cycles
- Longest uninterruptible instruction
- 8 cycles
- Longest interrupts-disabled section
- 40 cycles
Results
- Worst-case latency
- 0.83 µs
- Hardware entry time
- 0.17 µs
- Blocking from critical sections
- 0.67 µs
- Maximum sustainable interrupt rate
- 120.00 kHz
Step by step
- 1Values used
- 2Interrupt latency
- 3Worst-case latency= 0.83 µs
- 4Hardware entry time= 0.17 µs
- 5Blocking from critical sections= 0.67 µs
- 6Maximum sustainable interrupt rate= 120.00 kHz
Assumptions and limits
- The result is derived only from the 4 inputs listed above. Anything not among them is not part of the calculation.
- In particular, this calculator does not take inflation, tax or fees or charges into account.
- Figures are rounded for display to 2 decimal places, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.
How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.
Frequently Asked Questions
Why is the critical section usually worst?
Hardware entry is a dozen cycles, but a poorly written disabled section — a loop, a division, a long copy — can be thousands, and it delays every interrupt in the system.
What is priority inversion in this context?
A low-priority handler that runs long or disables interrupts delays a high-priority event, defeating the priority scheme entirely.
Related Calculators
- Acceleration Profile (Trapezoidal) Calculator
- ADC Sample Time Calculator
- AGV Fleet Size Calculator
- Analogue Sensor Scaling Calculator
- BLE Range Estimate Calculator
- Cabinet Heat Load Calculator
- Camera Field Of View For Inspection Calculator
- CAN Bus Bit Timing Calculator
- Charging Dock Cycle Time Calculator
- Coin Cell Battery Life Calculator
You might also need
- Contactor Sizing CalculatorAlso in Robotics, Automation & Embedded
- Deadband Setting CalculatorAlso in Robotics, Automation & Embedded
- Encoder Resolution CalculatorAlso in Robotics, Automation & Embedded
- Microstepping Resolution CalculatorAlso in Robotics, Automation & Embedded
- Overshoot Percentage CalculatorAlso in Robotics, Automation & Embedded
- PLC IO Count CalculatorAlso in Robotics, Automation & Embedded
