English
Language : 

HT66FM5230 Datasheet, PDF (43/176 Pages) Holtek Semiconductor Inc – Brushless DC Motor Flash Type 8-Bit MCU
HT66FM5230
Brushless DC Motor Flash Type 8-Bit MCU
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 fs clock which is in turn supplied
by the LIRC oscillator. The Watchdog Timer source clock is then subdivided by a ratio of 28 to
218 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.
Note that the Watchdog Timer function is always enabled, it can be controlled by WDTC register.
Watchdog Timer Control Register
A single register, WDTC, controls the required timeout period as well as the enable operation. The
WDTC register is initiated to 01010011B at any reset but keeps unchanged at the WDT time-out
occurrence in a power down state.
WDTC Register
Bit
7
Name
WE4
R/W
R/W
POR
0
6
WE3
R/W
1
5
WE2
R/W
0
4
WE1
R/W
1
3
WE0
R/W
0
2
WS2
R/W
0
1
WS1
R/W
1
0
WS0
R/W
1
Bit 7~ 3
Bit 2~ 0
WE4 ~ WE0: WDT function sorgware control
10101 or 01010: Enabled
Other values: Reset MCU (Reset will be active after 1~2 LIRC clock for debounce time.)
When these bits are changed by the environmental noise to reset the microcontroller,
the WRF bit in the CTRL register will be set to 1.
WS2 ~ WS0: WDT Time-out period selection
000: 28/fS
001: 210/fS
010: 212/fS
011: 214/fS
100: 215/fS
101: 216/fS
110: 217/fS
111: 218/fS
These three bits determine the division ratio of the Watchdog Timer source clock,
which in turn determines the timeout period.
Rev. 1.00
43
May 13, 2013