Interrupt Response Time

The minimum interrupt response time for all enabled interrupts is three CPU clock cycles: one cycle to finish the ongoing instruction, two cycles to store the Program Counter to the stack, and three cycles(1) to jump to the interrupt handler (JMP).

After the Program Counter is pushed on the stack, the program vector for the interrupt is executed. See Figure 1, first diagram.

The jump to the interrupt handler takes three clock cycles(1). If an interrupt occurs during execution of a multicycle instruction, this instruction is completed before the interrupt is served. See Figure 1, second diagram.

If an interrupt occurs when the device is in sleep mode, the interrupt execution response time is increased by five clock cycles. In addition, the response time is increased by the start-up time from the selected sleep mode. See Figure 1, third diagram.

A return from an interrupt handling routine takes four to five clock cycles, depending on the size of the Program Counter. During these clock cycles, the Program Counter is popped from the stack and the Stack Pointer is incremented.

Figure 1. Interrupt Execution of a Single-Cycle Instruction, Multicycle Instruction, and From Sleep(1)
Note:
  1. 1.Devices with 8 KB of Flash or less use RJMP instead of JMP, which takes only two clock cycles.