
CHAPTER 11 WATCH TIMER FUNCTIONS
User
’
s Manual U15862EJ3V0UD
404
11.4 Operation
11.4.1 Operation as watch timer
The watch timer generates an interrupt request at fixed time intervals. The watch timer operates using time
intervals of 0.5 seconds with the subclock (32.768 kHz).
The count operation starts when bit 0 (WTM0) and bit 1 (WTM1) of the watch timer operation mode register
(WTM) are set to 1. When these bits are set to 0, the 11-bit prescaler and 5-bit counter are cleared and the count
operation stops.
The 5-bit counter of the watch timer can be cleared to synchronize the time by setting the WTM1 bit to 0. At this
time, an error of up to 15.6 ms may occur.
The interval timer may be cleared by setting the WTM0 bit to 0. However, because the 5-bit counter is cleared at
the same time, an error of up to 0.5 seconds may occur when the watch timer overflows (INTWT).
11.4.2 Operation as interval timer
The watch timer can also be used as an interval timer that repeatedly generates an interrupt at intervals
specified by a count value set in advance.
The interval time can be selected by bits 4 to 7 (WTM4 to WTM7) of the watch timer operation mode register
(WTM).
Table 11-3. Interval Time of Interval Timer
WTM7
WTM6
WTM5
WTM4
Interval Time
0
0
0
0
2
4
×
1/fw
488
μ
s (operating at f
W
= f
XT
= 32.768 kHz)
0
0
0
1
2
5
×
1/fw
977
μ
s (operating at f
W
= f
XT
= 32.768 kHz)
0
0
1
0
2
6
×
1/fw
1.95 ms (operating at f
W
= f
XT
= 32.768 kHz)
0
0
1
1
2
7
×
1/fw
3.91 ms (operating at f
W
= f
XT
= 32.768 kHz)
0
1
0
0
2
8
×
1/fw
7.81 ms (operating at f
W
= f
XT
= 32.768 kHz)
0
1
0
1
2
9
×
1/fw
15.6 ms (operating at f
W
= f
XT
= 32.768 kHz)
0
1
1
0
2
10
×
1/fw
31.3 ms (operating at f
W
= f
XT
= 32.768 kHz)
0
1
1
1
2
11
×
1/fw
62.5 ms (operating at f
W
= f
XT
= 32.768 kHz)
1
0
0
0
2
4
×
1/fw
488
μ
s (operating at f
W
= f
BRG
= 32.768 kHz)
1
0
0
1
2
5
×
1/fw
977
μ
s (operating at f
W
= f
BRG
= 32.768 kHz)
1
0
1
0
2
6
×
1/fw
1.95 ms (operating at f
W
= f
BRG
= 32.768 kHz)
1
0
1
1
2
7
×
1/fw
3.91 ms (operating at f
W
= f
BRG
= 32.768 kHz)
1
1
0
0
2
8
×
1/fw
7.81 ms (operating at f
W
= f
BRG
= 32.768 kHz)
1
1
0
1
2
9
×
1/fw
15.6 ms (operating at f
W
= f
BRG
= 32.768 kHz)
1
1
1
0
2
10
×
1/fw
31.3 ms (operating at f
W
= f
BRG
= 32.768 kHz)
1
1
1
1
2
11
×
1/fw
62.5 ms (operating at f
W
= f
BRG
= 32.768 kHz)
Remark
f
W
: Watch timer clock frequency