
R01UH0218EJ0110 Rev.1.10
Page 157 of 664
Sep 12, 2011
R32C/142 Group and R32C/145 Group
10. Interrupts
10.6.4
Interrupt Sequence
An interrupt sequence is performed from when an interrupt request has been accepted until the interrupt
handler starts.
When an interrupt request is generated while an instruction is being executed, the requested interrupt is
evaluated in the priority resolver after the current instruction is completed, and the interrupt sequence
starts from the next cycle.
However, for instructions RMPA, SCMPU, SIN, SMOVB, SMOVF, SMOVU, SOUT, SSTR, SUNTIL, and
SWHILE, when an interrupt request is generated while an instruction is being executed, the current
instruction is suspended, and the interrupt sequence starts.
The interrupt sequence is as follows:
(1) The CPU acknowledges the interrupt request to obtain the interrupt information (the interrupt
number, and the interrupt request level) from the interrupt controller. Then the corresponding IR bit
becomes 0 (no interrupt requested).
(2) The state of the flag register (FLG) before the interrupt sequence is stored to a temporary register
in the CPU. The temporary register is inaccessible to users.
(3) The following bits in the flag register become 0:
The I flag (interrupt enable flag): interrupt disabled
The D flag (debug flag): single-step interrupt disabled
The U flag (stack pointer select flag): ISP selected
(4) The content of the temporary register in the CPU is saved to the stack, or to the save flag register
(SVF) in case of the fast interrupt. Note that the temporary register is inaccessible to users.
(5) The content of the program counter (PC) is saved to the stack, or to the save PC register (SVP) in
case of the fast interrupt.
(6) The interrupt request level for the accepted interrupt is set in the IPL (processor interrupt priority
level).
(7) The corresponding interrupt vector is read from the interrupt vector table.
(8) This interrupt vector is stored into the program counter.
After the interrupt sequence is completed, an instruction is executed from the start address of the interrupt
handler.