
Rev. 1.40
52
March 29, 2019
Rev. 1.40
53
March 29, 2019
HT45F23A/HT45F24A
TinyPower
TM
Flash MCU with OPA & Comparators
HT45F23A/HT45F24A
TinyPower
TM
Flash MCU with OPA & Comparators
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 clock, f
S
, which is in turn supplied by
one of two sources selected by configuration option: f
SUB
or f
SYS
/4. The f
SUB
clock can be sourced
from either the LXT or LIRC oscillators, again chosen via a configuration option. The Watchdog
Timer source clock is then subdivided by a ratio of 2
13
to 2
20
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. The LXT oscillator is supplied by an external 32.768kHz crystal. The other
Watchdog Timer clock source option is the f
SYS
/4 clock. The Watchdog Timer clock source can
originate from its own internal LIRC oscillator, the LXT oscillator or f
SYS
/4. It is divided by a value
of 2
13
to 2
20
, using the WS2~WS0 bits in the WDTC register to obtain the required Watchdog Timer
time-out period.
Watchdog Timer Control Register
A single register, WDTC, controls the required timeout period as well as the enable/disable
operation. This register together with several configuration options control the overall operation of
the Watchdog Timer.
WDTC Register
Bit
7
6
5
4
3
2
1
0
Name
FSYSON
WS2
WS1
WS0
WDTEN3 WDTEN2 WDTEN1 WDTEN0
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: 2
13
/f
S
001: 2
14
/f
S
010: 2
15
/f
S
011: 2
16
/f
S
100: 2
17
/f
S
101: 2
18
/f
S
110: 2
19
/f
S
111: 2
20
/f
S
These three bits determine the division ratio of the Watchdog Timer source clock,
which in turn determines the timeout period.
Bit 3 ~ 0
WDTEN3, WDTEN2, WDTEN1, WDTEN0
: WDT Software Control
1010: Disable
Other: Enable