Watchdog Timer
The Watchdog Timer is provided to prevent program malfunctions or sequences from jumping to
unknown locations, due to certain uncontrollable external events such as electrical noise.
Watchdog Timer Clock Source
The Watchdog Timer clock source is provided by the internal low speed oscillator, f
LIRC
. The Watchdog
Timer source clock is then subdivided by a ratio of 2
8
to 2
15
to give longer timeouts, the actual value
being chosen using the WS2~WS0 bits in the WDTC register. The LIRC internal oscillator has an
approximate period of 32kHz at a supply voltage of 5V.
However, it should be noted that this specified internal clock period can vary with VDD, temperature
and process variations.
Watchdog Timer Control Register
A single register, WDTC, controls the required timeout period.
WDTC Register
Bit
7
6
5
4
3
2
1
0
Name
FSYSON
WS2
WS1
WS0
D3
D2
D1
D0
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
POR
0
1
1
1
1
0
1
0
Bit 7
FSYSON
: f
SYS
control in IDLE Mode
0: disable
1: enable
Bit 6~4
WS2, WS1, WS0
: WDT time-out period selection
000: 256/f
LIRC
001: 512/f
LIRC
010: 1024/f
LIRC
011: 2048/f
LIRC
100: 4096/f
LIRC
101: 8192/f
LIRC
110: 16384/f
LIRC
111: 32768/f
LIRC
These three bits determine the division ratio of the Watchdog Timer source clock, which in turn
determines the timeout period.
Bit 3~0
Undefined bit
These bits can be read or written by user software program.
Watchdog Timer Operation
In these devices the Watchdog Timer supplied by the f
LIRC
oscillator and is therefore always on. The
Watchdog Timer operates by providing a device reset when its timer overflows. This means that in the
application program and during normal operation the user has to strategically clear the Watchdog
Timer before it overflows to prevent the Watchdog Timer from executing a reset. This is done using the
clear watchdog instructions. If the program malfunctions for whatever reason, jumps to an unkown
location, or enters an endless loop, these clear instructions will not be executed in the correct manner,
in which case the Watchdog Timer will overflow and reset the device.
BS83B08-3/B12-3/B16-3/B16G-3/C24-3
8-Bit Touch Key Flash MCU
Rev. 1.50
45
April 28, 2020