
86
CHAPTER 3 CPU
3.7.8
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.
I Changing to a standby mode and interrupts
If an interrupt request with an interrupt level higher than "11B" occurs from a peripheral function to the
CPU, writing "1" to the stop bit (STP),or sleep bit (SLP) 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.
I Wake-up from standby mode by interrupt
If an interrupt request with an interrupt level higher than "11B" 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 ILR4) 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.
I 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-7 "Standby control register 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.
Note that you cannot go to the watch standby mode when operating in main clock mode. (A write to the
TMD bit will be ignored.)