
R8C/3GM Group
9. Clock Generation Circuit
R01UH0284EJ0100 Rev.1.00
Aug 09, 2011
9.7.2.6
Exiting Wait Mode after CM30 Bit in CM3 Register is Set to 1 (MCU
Enters Wait Mode)
To use a peripheral function interrupt to exit wait mode, set up the following before setting the CM30 bit to 1.
(1) Set the I flag to 0 (maskable interrupt disabled).
(2) 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).
(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.5.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.5
Time from Wait Mode to First Instruction Execution following Exit after CM30 Bit in
CM3 Register is Set to 1 (MCU Enters Wait Mode)
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)
VCA20 Bit
The total of T0 to
T2 is the time
from wait mode to
first instruction
execution
following exit.
Remarks