
R01UH0218EJ0110 Rev.1.10
Page 160 of 664
Sep 12, 2011
R32C/142 Group and R32C/145 Group
10. Interrupts
10.7
Register Restoring from Interrupt Handler
When the REIT instruction is executed at the end of the interrupt handler, the values of the flag register
(FLG) and the program counter (PC), which are saved in the stack, are restored, and the program resumes
the operation that was interrupted. In the fast interrupt, execute the FREIT instruction to restore them from
the save registers, instead.
To restore the register values which are saved by software in the interrupt handler, use an instruction such
as POPM before the REIT or FREIT instruction.
If the register bank is switched in the interrupt handler, the bank is automatically switched back to the
original register bank by the REIT or FREIT instruction.
10.8
Interrupt Priority
If two or more interrupt requests are detected at an interrupt request sampling point, the interrupt request
with higher priority is accepted.
For maskable interrupts (peripheral interrupts), the interrupt request level select bits (bits ILVL2 to ILVL0)
select a request level. If two or more interrupt requests have the same request level, the interrupt with
higher priority, predetermined by hardware, is accepted.
The priorities of the reset and special interrupts, such as the watchdog timer interrupt, are determined by
the hardware. Note that the reset has the highest priority. The following is the priority order of hardware
interrupts:
Software interrupts are not governed by priority. A jump to the interrupt handler takes place whenever the
relevant instruction is executed.
10.9
Priority Resolver
The priority resolver selects an interrupt that has the highest priority among requested interrupts detected
at the same sampling point.
Figure 10.9 and
Figure 10.10 show the priority resolver of the R32C/142 Group and R32C/145 Group.
Reset
Watchdog timer
Oscillator stop detection
NMI Peripherals
>>
>