503
Watchdog Timer (WDT)
Chapter 15
Preliminary User’s Manual U17566EE1V2UM00
The running time depends on the frequency of the chosen clock. The following
table shows two examples for 4 MHz and 32 KHz.
These are just two examples for WDTCLK. The actual clock signal depends on
the clock divider settings and the external oscillator resonators.
Note
Every reset sets the WDCS register to 07
H
, which means the longest time
interval.
After SYSRESWDT, the timer is always stopped and initialized. You can write a
smaller value to the register.
After SYSRES, the WDTM register is not cleared. If the Watchdog Timer was
running before SYSRES occurred, it remains active. To specify a shorter
interval:
1. Write one byte to the WCMD register (the value is ignored)
2. Immediately after that, write one byte with the desired value of WDCS[2:0]
to the WDCS register
The write operation resets the watchdog counter to zero, and it continues with
the new timing.
Note
When the timer is active, WDCS can only be written once after reset. Then, the
register is locked until the next reset occurs (WDTM.LOCK_CS = 1).
Table 15-4
Running time examples
WDCS2
WDCS1
WDCS0
Calculation
Time until overflow
f
WDTCLK
= 4 MHz (main
oscillator)
f
WDTCLK
= 32 KHz (sub
oscillator)
0
0
0
2
13
/ f
WDTCLK
2 ms
256 ms
0
0
1
2
14
/ f
WDTCLK
4.1 ms
512 ms
0
1
0
2
15
/ f
WDTCLK
8.2 ms
1.02 s
0
1
1
2
16
/ f
WDTCLK
16.4 ms
2.05 s
1
0
0
2
17
/ f
WDTCLK
32.8 ms
4.10 s
1
0
1
2
18
/ f
WDTCLK
65.5 ms
8.20 s
1
1
0
2
19
/ f
WDTCLK
131 ms
16.38 s
1
1
1
2
20
/ f
WDTCLK
262 ms
32.77 s
electronic components distributor