
R8C/3GM Group
9. Clock Generation Circuit
R01UH0284EJ0100 Rev.1.00
Aug 09, 2011
9.7.2.7
Exiting Wait Mode after WAIT Instruction is Executed
To use a peripheral function interrupt to exit wait mode, set up the following before executing the WAIT
instruction.
(1) Set the interrupt priority level in bits ILVL2 to ILVL0 in the interrupt control registers of the peripheral
function interrupts to be used for exiting wait mode. Set bits ILVL2 to ILVL0 of the peripheral function
interrupts that are not to be used for exiting wait mode to 000b (interrupt disabled).
(2) Set the I flag to 1.
(3) Operate the peripheral function to be used for exiting wait mode.
When the MCU exits by a peripheral function interrupt, the time (number of cycles) between interrupt request
generation and interrupt routine execution is determined by the settings of the FMSTP bit in the FMR0 register
and the VCA20 bit in the VCA2 register, as shown in
Figure 9.6.The clock set by bits CM35, CM36, and CM37 in the CM3 register is used as the CPU clock when the MCU
exits wait mode by a peripheral function interrupt. At this time, the CM06 bit in the CM0 register and bits
CM16 and CM17 in the CM1 register automatically change.
Figure 9.6
Time from Wait Mode to Interrupt Routine Execution after WAIT instruction is
Executed
Wait mode
Interrupt request generation
Flash memory
activation sequence
T1
CPU clock
restart sequence
T2
Internal power
stabilization time
T0
100
s (max.)
0
s
100
s (max.)
0
s
0
(internal power
low consumption disabled)
1
(internal power
low consumption enabled)
1
(internal power
low consumption enabled)
0
(internal power
low consumption disabled
FMSTP Bit
0
(flash memory
operates)
1
(flash memory
stops)
FMR0 Register
VCA2 Register
100
s (max.)
Time until
Flash Memory
Activation (T1)
Period of system clock
× 1 cycle + 60 s
(max.)
Period of system clock
× 1 cycle
Period of CPU clock
× 2 cycles
Same as above
Time until
CPU Clock
Supply (T2)
Internal Power
Stabilization Time
(T0)
Time for
Interrupt
Sequence (T3)
Period of CPU clock
× 20 cycles
Same as above
VCA20 Bit
The total of T0
to T3 is the time
from wait mode to
interrupt routine
execution.
Remarks
Interrupt sequence
T3