477
Preliminary User’s Manual U17566EE1V2UM00
Chapter 14 Watch Timer (WT)
The Watch Timer (WT) generates interrupts at regular time intervals. These
interrupts are generally used as ticks for updating the internal daytime and
calendar.
The Watch Timer includes two identical counters. Throughout this chapter, the
counters are identified as WTn, where n = 0 to 1.
14.1 Overview
The Watch Timer consists of two 16-bit down-counters, WT0 and WT1, and
includes the Watch Calibration Timer WCT.
WT0
The load value that must be set for WT0 depends on the chosen clock
frequency and the desired time interval between two interrupts.
For example, WT0 can be set up to generate an interrupt every second
(INTWT0UV).
During normal operation, the clock of WT0 (WTCLK) is directly derived from
the precision main oscillator. It bypasses the PLL and SSCG.
However, the WTCLK can also be derived from the sub or ring oscillator. This
is useful when the main oscillator is switched off in order to save power.
WT1
WT1 is clocked by the interrupts generated by WT0. It can, for example,
generate an interrupt every hour (or whatever wake-up time is required).
This interrupt (INTWT1UV) can be used to escape from Sub-WATCH mode
and hence to revive the main oscillator if necessary.
WCT
The sub or ring oscillators used in Sub_WATCH mode are not as stable as the
main oscillator. The time between two WT0 interrupts may be slightly shorter
or longer than desired.
Therefore a third timer - the Watch Calibration Timer (WCT) - can be used
occasionally to measure the time between two interrupts INTWT0UV.
WCT requires the main oscillator clock for this measurement. Its clock,
WCTCLK, always stops if the main oscillator stops, that means if STOP mode
or Sub-WATCH mode are entered.
Based on the measurement result, a new load value for WT0 can be
calculated. This is the solution to regain precise intervals between WT0
interrupts. After the adjustment of WT0, the system can return to Sub-WATCH
mode where the main oscillator is stopped.
electronic components distributor