Panasonic MN101C77C User Manual

Page of 544
II - 23
Chapter 2   CPU Basics
Standby Functions
2-4-4
Transition to STANDBY Modes
The program initiates transitions from a CPU operating mode to the corresponding STANDBY (HALT/
STOP) modes by specifying the new mode in the CPU mode control register (CPUM). Interrupts initiate
the return to the former CPU operating mode.
Before initiating a transition to a STANDBY mode, however, the program must
(1)
Set the maskable interrupt enable flag (MIE) in the processor status word (PSW) to '0' to disable
all maskable interrupts temporarily.
(2)
Set the interrupt enable flags (xxxIE) in the interrupt control registers (xxxICR) to '1' or '0' to
specify which interrupts do and do not initiate the return from the STANDBY mode. Set MIE '1' to
enable those maskable interrupts.
Figure 2-4-3    Transition to/from STANDBY Mode
Processing inside parentheses () is handled by hardware.
If the interrupt is enabled but interrupt priority level of the interrupt to be used is not equal to
or higher than the mask level in PSW before transition to HALT or STOP mode, it is impos-
sible to return to CPU operation mode by maskable interrupt.
NORMAL/SLOW
mode
Disable all interrupts 
Enable interrupt which
will trigger return
Interrupt acceptance cycle
When returning from STOP
mode, wait for oscillation to
stabilize
)
(
Watchdog timer
HALT:  stop counting
STOP:  reset
)
(
Clear MIE flag in the PSW and all interrupt enable flags (xxx IE)
in the maskable interrupt control register.
Set the xxx IE of the return factor,
and set MIE flag in the PSW.
HALT/STOP
mode
NORMAL/SLOW
mode
Set HALT/STOP
mode
)
(
Return factor interrupt
occured
Watchdog timer
HALT:  restarts counting
STOP:  enabled