CHAPTER 8 WATCH TIMER
User’s Manual U15331EJ4V1UD
165
8.4 Watch Timer Operation
8.4.1 Operation as watch timer
The main system clock (4.19 MHz) or subsystem clock (32.768 kHz) is used to enable the watch timer to operate
at 0.5-second intervals.
Also, an interrupt request (INTWT) occurs at an interval of 1.0 seconds when using the 32.768 kHz subsystem
clock via a setting in the watch timer interrupt time selection register (WTIM).
The watch timer is used to generate an interrupt request at specified intervals.
By setting bits 0 and 1 (WTM0 and WTM1) of the watch timer mode control register (WTM) to 1, the watch timer
starts counting. By setting them to 0, the 5-bit counter is cleared and the watch timer stops counting.
It is possible to start the watch timer from zero seconds by clearing WTM1 to 0 when the interval timer and watch
timer operate at the same time. In this case, however, an error of up to 2
9
×
1/f
W
seconds may occur in the overflow
(INTWT) after the zero-second start of the watch timer because the 9-bit prescaler is not cleared to 0.
8.4.2 Operation as interval timer
The interval timer is used to repeatedly generate an interrupt request at the interval specified by a preset count
value.
The interval can be selected by bits 4 to 6 (WTM4 to WTM6) of the watch timer mode control register (WTM).
Table 8-3. Interval Time of Interval Timer
WTM6 WTM5 WTM4 Interval Time
At f
X
= 5.0 MHz
At f
X
= 4.19 MHz
At f
XT
= 32.768
kHz
At f
XT
= 16.384
kHz
0 0 0
2
4
×
1/f
W
409.6
µ
s 488
µ
s 488
µ
s 976
µ
s
0 0 1
2
5
×
1/f
W
819.2
µ
s 977
µ
s 977
µ
s 1.95
ms
0 1 0
2
6
×
1/f
W
1.64 ms
1.95 ms
1.95 ms
3.90 ms
0 1 1
2
7
×
1/f
W
3.28 ms
3.91 ms
3.91 ms
7.82 ms
1 0 0
2
8
×
1/f
W
6.55 ms
7.81 ms
7.81 ms
15.6 ms
1 0 1
2
9
×
1/f
W
13.1 ms
15.6 ms
15.6 ms
31.2 ms
Other than above
Setting prohibited
Remarks
1.
f
X
: Main system clock oscillation frequency
2.
f
XT
: Subsystem clock oscillation frequency
3.
f
W
: Watch timer clock frequency
Содержание PD789488
Страница 2: ...2 User s Manual U15331EJ4V1UD MEMO ...