Work out interrupt latency instantly with clear inputs, formula shown and shareable results.
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.
Interrupt latency
latency = (entry cycles + longest instruction + longest disabled section) / clock frequency
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.
A low-priority handler that runs long or disables interrupts delays a high-priority event, defeating the priority scheme entirely.