115
3.7 Standby Modes (Low-Power Consumption)
3.7.9
Notes on Using Standby Modes
The CPU does not change to a standby mode if an interrupt request occurs from a
peripheral function when a standby mode is set in the standby control register. (STBC)
Also, if an interrupt is used to wake up from a standby mode to the normal operating
state, the operation after wake-up differs depending on whether or not the interrupt
request is accepted.
s Changing to a Standby Mode and Interrupts
If an interrupt request with an interrupt level higher than "11" occurs from a peripheral function
to the CPU, writing "1" to the stop bit (STP), sleep bit (SLP), or watch bit (TMD) in the standby
control register (STBC) is ignored. Therefore, the CPU does not change to a standby mode.
(The CPU also does not change to the standby mode after completing interrupt processing.)
This does not depend on whether or not the CPU accepts the interrupt.
Even if the CPU is currently performing interrupt processing, the interrupt request flag bit is
cleared and, if no other interrupt request is present, the device can change to the standby
mode.
s Wake-up from Standby Mode by Interrupt
If an interrupt request with an interrupt level higher than "11" occurs from a peripheral function
or others during sleep or stop mode, the CPU wakes up from a standby mode. This does not
depend on whether or not the CPU accepts the interrupt.
After wake-up from a standby mode, the CPU performs the normal interrupt operations. If the
level set in the interrupt level setting register (ILR1 to ILR3) corresponding to the interrupt
request is higher than the interrupt level bits in the condition code register (CCR: IL1, IL0), and if
the interrupt enable flag is enabled (CCR: I = "1"), the CPU branches to the interrupt processing
routine. If the interrupt is not accepted, operation restarts from the instruction following the
instruction that activated a standby mode.
To prevent control from branching to an interrupt processing routine after wake-up, take
measures such as disabling interrupts before setting a standby mode.
s Notes on Setting Standby Mode
When setting the standby control register (STBC) to go to a standby mode, make the settings in
accordance with Table 3.7-9 "Standby Control Register (STBC) Low-Power Consumption Mode
Settings". The order of precedence as to which mode will be activated if more than one bit is set
to "1" is "stop" mode, "watch" mode, and "sleep" mode. Other factors being equal, it is best to
set "1" for just one bit.
Also avoid going to stop, sleep, or watch mode immediately after switching from subclock to
main clock mode (SYCC: SCS=0 --> 1). First verify that the clock monitor bit (SYCC: SCM) of
the system control register is "1", then make the standby mode change.