2 POWER SUPPLY, RESET, AND CLOCKS
2-10
Seiko Epson Corporation
S1C17M12/M13 TECHNICAL MANUAL
(Rev. 1.2)
2.4.2 Transition between Operating Modes
State transitions between operating modes shown in Figure 2.4.2.1 take place in this IC.
RUN mode
RUN mode refers to the state in which the CPU is executing the program. A transition to this mode takes place
when the system reset request from the system reset controller is canceled. RUN mode is classified into “IOSC
RUN,” “OSC3 RUN,” and “EXOSC RUN” by the SYSCLK clock source.
HALT mode
When the CPU executes the halt instruction, it suspends program execution and stops operating. This state is
HALT mode. In this mode, the clock sources and peripheral circuits keep operating. This mode can be set while
no software processing is required and it reduces power consumption as compared with RUN mode. HALT
mode is classified into “IOSC HALT,” “OSC3 HALT,” and “EXOSC HALT” by the SYSCLK clock source.
SLEEP mode
When the CPU executes the slp instruction, it suspends program execution and stops operating. This state is
SLEEP mode. In this mode, the clock sources stop operating as well. However, the clock source in which the
CLGOSC.IOSCSLPC/OSC3SLPC/EXOSCSLPC bit is set to 0 keeps operating, so the peripheral circuits with
the clock being supplied can also operate. By setting this mode when no software processing and peripheral cir-
cuit operations are required, power consumption can be less than HALT mode.
The RAM retains data even in SLEEP mode.
Note: The current consumption when a clock source is active in SLEEP mode by setting the CLGOSC.
IOSCSLPC/OSC3SLPC/EXOSCSLPC bit to 0 is equivalent to the value in HALT mode with the
same clock source condition (refer to “Current Consumption, Current consumption in HALT
mode I
HALT1
and I
HALT2
” in the “Electrical Characteristics” chapter).
DEBUG mode
When a debug interrupt occurs, the CPU enters DEBUG mode. DEBUG mode is canceled when the retd in-
struction is executed. For more information on DEBUG mode, refer to “Debugger” in the “CPU and Debugger”
chapter.
IOSC
RUN
OSC3
RUN
IOSC
HALT
OSC3
HALT
RESET
(Initial state)
RUN/
HALT/
SLEEP
DEBUG
Transition takes place automatically by the
initial boot sequence after a request from
the reset source is canceled.
∗
In RUN and HALT modes, the clock sources not used
as SYSCLK can be all disabled.
HAL
T/SLEEP
cancelatio
n
signal
halt instr
uctio
n
Debug interrupt
retd instruction
RUN
SLEEP
slp instruction
HALT/SLEEP
cancelation signal
(wake-up)
halt instr
uctio
n
HA
LT
/SLEEP
cancelation signal
CLGSCLK.CLKSRC[1:0] = 0x
2
CLGSCLK.CLKSRC[1:0] = 0x
0
EXOSC
RUN
CLGSCLK.CLKSRC[1:0] = 0x2
CLGSCLK.CLKSRC[1:0] = 0x3
EXOSC
HALT
HA
LT
/SLEEP
cancelation
signal
halt instr
uctio
n
CLGSCLK.CLKSRC[1:0] = 0x
0
CLGSCLK.CLKSRC[1:0] = 0x
3
Figure 2.4.2.1 Operating Mode-to-Mode State Transition Diagram