EasyManua.ls Logo

Holtek HT66F002 - Watchdog Timer Operation; Watchdog Timer Enable;Disable Control

Default Icon
144 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Rev. 1.71 48 April 11, 2017 Rev. 1.71 49 April 11, 2017
HT66F002/HT66F0025/HT66F003/HT66F004
Cost-Effective A/D Flash MCU with EEPROM
HT66F002/HT66F0025/HT66F003/HT66F004
Cost-Effective A/D Flash MCU with EEPROM
SMOD1 Register
Bit 7 6 5 4 3 2 1 0
Name FSYSON D3 LVRF WRF
R/W R/W R/W R/W R/W
POR 0 0 x 0
“x” unknown
B
it7 FSYSON:f
SYS
ControlinIDLEMode
0:Disable
1:Enable
Bit6~4 Unimplemented,readas0
Bit3 D3:Reservedbit
Bit2 LVRF:LVRfunctionresetag
0:Notactive
1:Active
Thisbitcanbeclearto“0”,butcannotbesetto“1”.
Bit1 Unimplemented,readas0
Bit0 WRF:WDTControlregistersoftwareresetag
0:Notoccur
1:Occurred
Thisbitissetto1bytheWDTControlregistersoftwareresetandclearedbytheapplicationprogram.
Notethatthisbitcanonlybeclearedto0bytheapplicationprogram.
Watchdog Timer Operation
TheWatchdogTimeroperatesbyprovidingadeviceresetwhenitstimeroverows.Thismeans
thatintheapplicationprogramandduringnormaloperationtheuserhastostrategicallyclearthe
WatchdogTimerbeforeitoverows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unknownlocation,orentersanendlessloop,theclearWDTinstructionswillnotbeexecuted
inthecorrectmanner,inwhichcasetheWatchdogTimerwilloverowandresetthedevice.With
regardtotheWatchdogTimerenable/disablefunction,therearevebits,WE4~WE0,intheWDTC
registertoadditionalenable/disableandresetcontroloftheWatchdogTimer.
WE4 ~ WE0 Bits WDT Function
10101B Disable
01010B Enable
Any other value Reset MCU
Watchdog Timer Enable/Disable Control
Undernormalprogramoperation,aWatchdogTimertime-outwillinitialiseadeviceresetandset
thestatusbitTO.However,ifthesystemisintheSLEEPorIDLEMode,whenaWatchdogTimer
time-outoccurs,theTObitinthestatusregisterwillbesetandonlytheProgramCounterandStack
Pointerwillbereset.FourmethodscanbeadoptedtoclearthecontentsoftheWatchdogTimer.
TherstisaWDTreset,whichmeansavalueotherthan01010Band10101Biswrittenintothe
WE4~WE0bitlocations,thesecondisanexternalhardwarereset,whichmeansalowlevelonthe
externalresetpin,thethirdisusingtheWatchdogTimersoftwareclearinstructionsandthefourth
isviaaHALTinstruction.Thereisonlyonemethodofusingsoftwareinstructiontoclearthe
WatchdogTimer.Thatistousethesingle“CLRWDT”instructiontocleartheWDT.

Table of Contents

Related product manuals