
CHAPTER 11 WATCH TIMER FUNCTIONS
Preliminary User’s Manual U16541EJ1V0UM
329
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) or prescaler 3 (at 32.768 kHz).
The count operation starts when the WTM1 and WTM0 bits of the WTM register are set to 11. When the WTM0 bit
is cleared to 0, the 11-bit prescaler and 5-bit counter are cleared and the count operation stops.
The time of the watch timer can be adjusted by clearing the WTM1 bit to 0 and then the 5-bit counter. At this time,
an error of up to 15.6 ms may occur.
The interval timer may be cleared by clearing 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 the WTM4 to WTM7 bits of the WTM register.
Table 11-3. Interval Time of Interval Timer
WTM7
WTM6
WTM5
WTM4
Interval Time
0
000
2
4
× 1/fw
488
s (operating at fW = fXT = 32.768 kHz)
0
001
2
5
× 1/fw
977
s (operating at fW = fXT = 32.768 kHz)
0
010
2
6
× 1/fw
1.95 ms (operating at fW = fXT = 32.768 kHz)
0
011
2
7
× 1/fw
3.91 ms (operating at fW = fXT = 32.768 kHz)
0
100
2
8
× 1/fw
7.81 ms (operating at fW = fXT = 32.768 kHz)
0
101
2
9
× 1/fw
15.6 ms (operating at fW = fXT = 32.768 kHz)
0
110
2
10
× 1/fw
31.3 ms (operating at fW = fXT = 32.768 kHz)
0
111
2
11
× 1/fw
62.5 ms (operating at fW = fXT = 32.768 kHz)
1
000
2
4
× 1/fw
488
s (operating at fW = fBRG = 32.768 kHz)
1
001
2
5
× 1/fw
977
s (operating at fW = fBRG = 32.768 kHz)
1
010
2
6
× 1/fw
1.95 ms (operating at fW = fBRG = 32.768 kHz)
1
011
2
7
× 1/fw
3.91 ms (operating at fW = fBRG = 32.768 kHz)
1
100
2
8
× 1/fw
7.81 ms (operating at fW = fBRG = 32.768 kHz)
1
101
2
9
× 1/fw
15.6 ms (operating at fW = fBRG = 32.768 kHz)
1
110
2
10
× 1/fw
31.3 ms (operating at fW = fBRG = 32.768 kHz)
1
111
2
11
× 1/fw
62.5 ms (operating at fW = fBRG = 32.768 kHz)
Remark
fW: Watch timer clock frequency