A96G140/A96G148/A96A148 User’s manual
11. Watch timer
91
11
Watch timer
Watch timer (WT) has functions for RTC (Real Time Clock) operation. It is generally used for RTC
design. WT consists of a clock source select circuit, a timer counter circuit, an output select circuit and
watch timer control registers.
Prior to operate WT, a user needs to determine an input clock source and output interval, and to set
WTEN to ‘1’ in watch timer control register (WTCR). It is able to execut
e simultaneously or individually.
To stop or reset WT, clear the WTEN bit in WTCR register.
Although CPU is in STOP mode, a sub clock can be alive so that WT continues its operation. Watch
timer counter circuits may be composed of 21-bit counter which contains low 14-bit with binary counter
and high 7-bit counter in order to increase resolution. In WTDR, it can control WT clear and set interval
value at write time, and it can read 7-bit WT counter value at read time.
11.1
WT block diagram
In this section, watch timer of A96G140/A96G148/A96A148 is described in a block diagram.
P
r
e
s
c
a
l
e
r
fx
M
U
X
f
S UB
f
WCK
14Bit
Bin ary Counter
Timer counter
f
WCK
/2
14
WTCR
WTE N
-
-
WTIFR WTIN1 WTIN0 WTCK1 WTCK0
MUX
f
WCK
/2
14
f
WCK
/2
13
f
WCK
/2
7
WTIFR
To i nte rrupt
block
WTCL
WTDR6 WTDR5 WTDR4
WTDR3 WTDR2 WTDR1 WTDR0
WTDR
Write case
-
WTCNT6 WTCNT5 WTCNT4 WTCNT3 WTCNT2 WTCNT1 WTCNT0
WTCNT
Read case
Clear
INT_ACK
fx/64
fx/128
fx/256
2
f
WCK
14
/(2 X(7 bit WTDR Value +1))
Comparator
match
Reload
Match
WTCL
Clear
Match
WTCL
Figure 30. Watch Timer Block Diagram
11.2
Register map