R8C/13 Group
6.4 Power Control
6.4.2 Wait Mode
In wait mode, the CPU clock is turned off, so are the CPU and the watchdog timer because both are
operated by the CPU clock. Because the main clock and on-chip oscillator clock both are on, the
peripheral functions using these clocks keep operating.
• Peripheral Function Clock Stop Function
If the CM02 bit is “1” (peripheral function clocks turned off during wait mode), the f1, f2, f8, f32, f1SIO,
f8SIO, f32SIO, and fAD clocks are turned off when in wait mode, with the power consumption reduced
that much.
• Entering Wait Mode
The microcomputer is placed into wait mode by executing the WAIT instruction.
• Pin Status During Wait Mode
The status before wait mode is retained.
• Exiting Wait Mode
The microcomputer is moved out of wait mode by a hardware reset or peripheral function interrupt.
When using a hardware reset to exit wait mode, set the ILVL2 to ILVL0 bits for the peripheral function
interrupts to “0002” (interrupts disabled) before executing the WAIT instruction.
The peripheral function interrupts are affected by the CM02 bit. If CM02 bit is “0” (peripheral function
clocks not turned off during wait mode), all peripheral function interrupts can be used to exit wait
mode. If CM02 bit is “1” (peripheral function clocks turned off during wait mode), the peripheral
functions using the peripheral function clocks stop operating, so that only the peripheral functions
clocked by external signals can be used to exit from wait mode.
Table 6. 3 lists the interrupts to exit wait mode and the usage conditions.
When using a peripheral function interrupt to exit wait mode, set up the following before executing
the WAIT instruction.
1. In the ILVL2 to ILVL0 bits in the interrupt control register, set the interrupt priority level of the
peripheral function interrupt to be used to exit wait mode.
Also, for all of the peripheral function interrupts not used to exit wait mode, set the ILVL2 to ILVL0
bits to “0002” (interrupt disable).
2. Set the I flag to “1”.
3. Enable the peripheral function whose interrupt is to be used to exit wait mode.
In this case, when an interrupt request is generated and the CPU clock is thereby turned on, an
interrupt sequence is executed.
The CPU clock turned on when exiting wait mode by a peripheral function interrupt is the same CPU
clock that was on when the WAIT instruction was executed.
Table 6.3 Interrupts to Exit Wait Mode and Usage Conditions
Interrupt
CM02=0
CM02=1
Can be used when operating with internal
or external clock
Serial interface interrupt
Can be used when operating with external clock
Can be used
Can be used
Key input interrupt
A/D conversion interrupt
Timer X interrupt
(Do not use)
Can be used in one-shot mode
Can be used in all modes
Can be used in event counter mode
Can be used when counting inputs from CNTR1
pin in timer mode
Timer Y interrupt
Can be used in all modes
Can be used in all modes
Can be used in all modes
Can be used
Timer Z interrupt
Timer C interrupt
(Do not use)
(Do not use)
INT interrupt
Can be used (INT0 and INT3 can be used if there
is no filter.
Voltage detection interrupt
Can be used
Can be used
Can be used
Oscillation stop detection
interrupt
(Do not use)
Rev.1.20 Jan 27, 2006 page 39 of 205
REJ09B0111-0120