AN202
V1.0 | Page 51/73
www.cmostek.com
8 Watchdog Timer
16-bit
WDT
Module
32KHz
WDTEN
SWDTEN
0
1
From Timer0
Clock Source
P
S
A
WDTPS<3:0>
Prescaler
8bit
1
0
P
S
A
To Timer0
WDT
Time-out
Figure 8-1. Watchdog and Timer0 Diagram
The watchdog's clock source is the internal slow clock (32KHz), which is a 16-bit counter.It shares an 8-bit
prescaler with the timer0. The enabled bit WDTEN is the third bit of the configuration register UCFG0.When
WDTEN is 1, enable the watchdog. When it is 0, disable the watchdog. It is determined by the BOOT during
the power start-up process, or it can be written through the external serial port.Clearing the watchdog
instruction CLRWDT and SLEEP will clear the watchdog counter.In the case of enabling the watchdog, the
watchdog overflowing can be used as a wake-up source when the MCU is in sleep, and the watchdog can be
used as a reset source when the MCU works well.
Table 8-1. Watchdog Status
Condition
Watchdog Status
WDTEN and SWDTEN are 0 at the same time
Clear
CLRWDT instruction
Enter the SLEEP, exit the SLEEP
Note:
If the internal slow clock switches from 32K to 256K mode (or vice versa from 256K to 32K mode), it doesn't
affect the watchdog timing, because WDT is fixed to use the 32K clock source.
Содержание CMT2189C
Страница 32: ...AN202 V1 0 Page 32 73 www cmostek com...