481
Watch Timer (WT)
Chapter 14
Preliminary User’s Manual U17566EE1V2UM00
(3)
Operation of WCT
The third counter WCT is used for clock correction. This counter is connected
to PCLK1 (8 MHz) or directly to the 4 MHz main oscillator. It is used to
measure the time between two INTWT0UV requests.
For this measurement, WCT is configured as a capture timer.
Once it is enabled, the WCT counter is increased with every rising edge of its
clock. When the value FFFF
H
is reached, the counter sets a flag and restarts
with 0000
H
.
The interrupt INTWT0UV from counter WT0 triggers the capture operation. At
every INTWT0UV, the count value is captured, and the interrupt INTTM00 is
generated. From the counter difference between two consecutive capture
events, the accuracy of the WTCLK can be measured, and WT0 or WT1,
respectively, can be corrected.
The WCT can be programmed to restart counting after the capture operation.
Note
The WCT detects the valid edge of INTWT0UV by sampling its input signal
(the INTWT0UV interrupt line) with WCTCLK. The capture operation is only
performed if the same level after a valid edge is detected two times in series.
As a consequence, the time interval measurement will only work correctly if
f
WTCLK
< f
WCTCLK
/ 2.
electronic components distributor