III PERIPHERAL MODULES 1 (SYSTEM): CLOCK MANAGEMENT UNIT (CMU)
S1C33E07 TECHNICAL MANUAL
EPSON
III-1-23
III
CMU
III.1.11 Standby Modes
The S1C33E07 supports two standby modes: HALT and SLEEP. Power consumption on the chip can be greatly
reduced by placing the CPU in one of these standby modes.
Moreover, the CPU must be placed in SLEEP mode before clock sources for the system (OSC3, OSC1, or PLL) are
switched over.
III.1.11.1 HALT Mode
The CPU suspends program execution upon executing the halt instruction and enters HALT mode.
In HALT mode, the CPU and A0RAM (area 0 no-wait RAM) stop operating. Furthermore, the circuit for which
the clock supply is automatically stopped in HALT mode (see Section III.1.9.2) stops operating. The other internal
peripheral circuits remain in the state (idle or operating) held when the halt instruction was executed.
The CPU is released from HALT mode by initial reset, an NMI or other interrupt, or a forcible break from the
debugger.
HALT mode is effective in reducing power consumption on the chip when running the CPU is unnecessary, such as
when waiting for external input or responses from peripheral circuits. When the CPU is released from HALT mode
by an interrupt, it enters a program executable state by trap processing and executes an interrupt handling routine
for the interrupt generated. In trap processing of the CPU, the address for the instruction next to halt is saved to the
stack as a return address from the interrupt handling routine, so that the reti instruction in the interrupt handling
routine branches to the instruction next to halt.
The CPU is released from HALT mode when the interrupt controller (ITC) asserts the interrupt signal to be sent
to the CPU. In other words, when a cause-of-interrupt flag of the interrupts that have been enabled by the interrupt
enable bits in the ITC is set to 1, the CPU can be released from HALT mode even if the PSR is set to disable
interrupts. However, in this case the CPU does not execute the interrupt handling routine.
The #NMI signal releases the CPU from HALT mode when it goes low level.
III.1.11.2 SLEEP Mode
The CPU suspends program execution upon executing the slp instruction and enters SLEEP mode. In SLEEP mode,
the CPU stops operating and the CMU stops supplying a clock to each functional module. Therefore, all peripheral
circuits (except the oscillator circuit and RTC) stop operating. Note that before the CMU actually stops clock output
after initiating processing to enter SLEEP mode, up to 8 clock cycles of the source clock (OSC) then selected are
required.
The CPU is reawaken from SLEEP mode by initial reset, RTC interrupt, NMI, or other interrupt from an external
device (when WAKEUPWT = 1).
When the CPU is reawaken from SLEEP mode by an interrupt, it enters a program executable state by trap
processing and executes an interrupt handling routine for the interrupt generated. In trap processing of the CPU, the
address for the instruction next to slp is saved to the stack as a return address from the interrupt handling routine, so
that the reti instruction in the interrupt handling routine branches to the instruction next to slp.
Cause-of-interrupt flags in the interrupt controller (ITC) cannot be set in SLEEP mode as the clock is not supplied
to the ITC in SLEEP mode.
Therefore, when the clock is not supplied to the ITC, the interrupt signals from the interrupt sources that have
been enabled to generate an interrupt are input to the CMU through the ITC and used to wake up the CPU from a
standby mode. In this case, the cause-of-interrupt flag is set after the clock has started supplying to the ITC. The
CPU can wake up from SLEEP mode by a cause of interrupt as described above even if the PSR is set to disable
interrupts, note however, that the CPU does not execute the interrupt handling routine.
The #NMI signal releases the CPU from SLEEP mode when it goes low level.