
10. Interrupts
10.6.3
Interrupt Sequence
The interrupt sequence is performed after an interrupt request acknowledgment, and completed before interrupt
routine execution.
When an interrupt request is generated while an instruction is being executed, the CPU determines its interrupt
priority after the instruction is completed. Then, the CPU starts the interrupt sequence from the following cycle.
However, for the SCMPU, SIN, SMOVB, SMOVF, SMOVU, SSTR, SOUT, and RMPA instructions, if an
interrupt request is generated while one of these instruction is being executed, the MCU suspends the
instruction to start the interrupt sequence.
The interrupt sequence is performed as indicated below:
(1) The CPU obtains the interrupt number by reading the address 000000h (address 000002h for the high-
speed interrupt). Then, the IR bit for the acknowledged interrupt becomes 0 (interrupt not requested).
(2) The contents of the FLG register, which is immediately before the interrupt sequence, is saved to a
temporary register(1) in the CPU.
(3) Each bit in the FLG register is set as follows:
The I flag is set to 0 (interrupt disabled)
The D flag is set to 0 (single-step interrupt disabled)
The U flag is set to 0 (ISP selected)
(4) A temporary register in the CPU is pushed onto the stack; or to the SVF register for the high-speed
interrupt.
(5) PC is pushed onto the stack; or to the SVP register for the high-speed interrupt.
(6) The interrupt priority level of the acknowledged interrupt becomes the IPL level.
(7) A interrupt vector corresponding to the acknowledged interrupt is stored into PC.
After the interrupt sequence is completed, instructions are executed from the start address of the interrupt
routine.
NOTE:
1. Temporary register cannot be accessed by users.
10.6.4
Interrupt Response Time
Figure 10.7 shows the interrupt response time. Interrupt response time is the period between an interrupt request
generation and the end of an interrupt sequence. Interrupt response time includes the period between interrupt
an request generation and the end of instruction execution ((a) in
Figure 10.7) and the period required to
Figure 10.7
Interrupt Response Time
Instruction
Interrupt sequence
Instruction in interrupt routine
Time
Interrupt response time
(a)
(b)
Interrupt request is
acknowledged
Interrupt request is
generated
(a) Period between an interrupt request generation and the end of instruction execution.
(b) Period required to perform an interrupt sequence.