
ST10R272L - WATCHDOG TIMER
257/320
WDTCON (FFAEh / D7h)
SFR
Reset Value: 000Xh
Note
The reset value will be 0002h, if the reset was triggered by the watchdog timer
(overflow). It will be 0000h otherwise.
The time period for an overflow of the watchdog timer is programmable in two ways:
•
The watchdog timer input frequency can be selected by bit WDTIN in register WDTCON
to be either f
CPU
/2 or f
CPU
/128.
•
The reload value WDTREL for the high byte of WDT can be programmed in register
WDTCON.
The period P
WDT
between servicing the watchdog timer and the next overflow can therefore
be determined by the following formula:
Refer to the device datasheet for a table of watchdog timer ranges.
Bit
Function
WDTIN
Watchdog Timer Input Frequency Selection
‘0’: Input frequency is f
CPU
/ 2
‘1’: Input frequency is f
CPU
/ 128
WDTR
Watchdog Timer Reset Indication Flag
Set by the watchdog timer on an overflow.
Cleared by a hardware reset or by the SRVWDT instruction.
WDTREL
Watchdog Timer Reload Value (for the high byte)
-
WDT
R
-
WDT
IN
-
-
-
-
5
4
3
2
1
0
11
10
9
8
7
6
15
14
13
12
-
-
-
r
rw
-
-
WDTREL
-
rw
P
WDT
=
f
CPU
2
(1 + <WDTIN>*6)
* (2
16
- <WDTREL> * 2
8
)