11.4 Operation
11.4.1 Operation as watch timer
The watch timer operates with time intervals of 2
clock (32.768 kHz).
The watch timer generates an interrupt request (INTWT) at fixed time intervals.
The count operation of the watch timer is started when bits 0 (WTM0) and 1 (WTM1) of the watch timer mode control
register (WTM) are set to 1. When these bits are cleared to 0, the 5-bit counter is cleared, and the watch timer stops
the count operation.
When the interval timer function is started at the same time, the watch timer can be started from 0 second by
resetting WTM1 to 0. However, an error of up to 2
Caution A time interval of 0.5 second cannot be generated by the 12.5 MHz main system clock. Use the
32.768 kHz subsystem clock to generate the 0.5-second time interval
11.4.2 Operation as interval timer
The watch timer can also be used as an interval timer that repeatedly generates an interrupt request (INTTM3)
at intervals specified by a count value set in advance.
The interval time can be selected by bits 4 through 6 (WTM4 through WTM6) of the watch timer mode control register
(WTM).
WTM6
WTM5
WTM4
0
0
0
0
0
1
0
1
0
0
1
1
1
0
0
1
0
1
Other than above
Cautions 1. Stop the timer operation before overwriting WTM.
2. Do not overwrite WTM when both the watch timer and interval timer are being used. If
the timer is stopped to overwrite WTM, both the prescaler and timer are cleared, causing
an error to occur for the watch timer interrupt (INTWT).
Remark f
: Watch timer clock oscillation frequency (f
W
f
: Main system clock frequency
XX
f
: Subsystem clock oscillation frequency
XT
CHAPTER 11 WATCH TIMER
14
/f
W
14
/f
W
Table 11-3. Interval Time of Interval Timer
Interval Time
f
XX
4
× 1/f
164 µ s
2
W
328 µ s
5
× 1/f
2
W
× 1/f
655 µ s
6
2
W
× 1/f
7
2
1.31 ms
W
8
× 1/f
2
2.62 ms
W
9
× 1/f
2
5.24 ms
W
Setting prohibited
User's Manual U12697EJ3V0UM
5
or 2
/f
with the main system clock (4.19 MHz) or subsystem
W
5
or 2
/f
may occur when the watch timer overflows (INTWT).
W
= 12.5 MHz
f
= 4.19 MHz
XX
488 µ s
977 µ s
1.95 ms
3.91 ms
7.81 ms
15.6 ms
7
/2
or f
)
XX
XT
f
= 32.768 kHz
XT
488 µ s
977 µ s
1.95 ms
3.91 ms
7.81 ms
15.6 ms
223