13.3.2.3 Interrupt Response Time
The minimum interrupt response time is represented in the following table.
Flash Size > 8 KB | Flash Size ≤ 8 KB | |
---|---|---|
Finish ongoing instruction | One cycle | One cycle |
Store PC to stack | Two cycles | Two cycles |
Jump to interrupt handler | Three cycles (jmp ) |
Two cycles (rjmp ) |
After the Program Counter is pushed on the stack, the program vector for the interrupt is executed. See the following figure.
If an interrupt occurs during the execution of a multi-cycle instruction, the instruction is completed before the interrupt is served, as shown in the following figure.
If an interrupt occurs when the device is in a sleep mode, the interrupt execution response time is increased by five clock cycles, as shown in the figure below. Also, the response time is increased by the start-up time from the selected sleep mode.
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.
- Devices with 8 KB of Flash or less use
RJMP
instead ofJMP
, which takes only two clock cycles.