
Example: Starting the STOP mode from the SLOW mode with an INT5 interrupt
(Warm-up time at release of the STOP mode is about 450ms at fs=32.768 kHz.)
PINT5:
TEST
(P0PRD).5
;To reject noise, the STOP mode does not start
JRS
F, SINT5
;if the STOP pin input is high.
LD
(SYSCR1), 0x40
;Sets up the level-sensitive release mode
LD
(WUCCR), 0x03
;WUCCR<WUCDIV> = 00 (No division) (Note)
LD
(WUCDR),0xE8
;Sets the warm-up time
;450 ms/1.953 ms = 230.4 → round up to 0xE8
DI
;IMF = 0
SET
(SYSCR1).7
;Starts the STOP mode
SINT5:
RETI
Note:
When the STOP mode is released, the warm-up counter source clock automatically changes to the clock that
generated the main system clock when the STOP mode was started, regardless of WUCCR<WUCSEL>.
STOP pin
XOUT pin
NORMAL mode
The STOP mode is released by the hardware.
NORMAL mode
VIH
Warm-up
STOP mode
Confirm by program that
the STOP pin input is low
and start the STOP mode.
Always released if the
STOP pin input is high.
Note:
Even if the STOP pin input returns to low after the warm-up starts, the STOP mode is not restarted.
Figure 2-8 Level-sensitive Release Mode (Example when the high-frequency clock oscillation
circuit is selected)
- Edge-sensitive release mode
In this mode, the STOP mode is released at the rising edge of the STOP pin input.
Setting SYSCR1<RELM> to "0" selects the edge-sensitive release mode.
This is used in applications where a relatively short program is executed repeatedly at
periodic intervals. This periodic signal (for example, a clock from a low-power con-
sumption oscillator) is input to the STOP pin. In the edge-sensitive release mode, the
STOP mode is started even when the STOP pin input is high
Example: Starting the STOP mode from the NORMAL mode
(Warm-up time at release of the STOP mode is about 200μs at fc=10 MHz.)
LD
(WUCCR),0x01
;WUCCR<WUCDIV> = 00 (No division) (Note)
LD
(WUCDR),0x20
;Sets the warm-up time
;200μs / 6.4μs = 31.25 → round up to 0x20
DI
;IMF = 0
LD
(SYSCR1) , 0x80
;Starts the STOP mode with the edge-sensitive release mode selected
Note:
When the STOP mode is released, the warm-up counter source clock automatically changes to the clock that
generated the main system clock when the STOP mode was started, regardless of WUCCR<WUCSEL>.
TMP89FH42
2. CPU Core
2.3 System clock controller
Page 30
RA004