Rev. 1.20 56 January 23, 2015 Rev. 1.20 57 January 23, 2015
BS82B12A-3/BS82C16A-3/BS82D20A-3
Touch Key 8-Bit Flash MCU with LED/LCD Driver
BS82B12A-3/BS82C16A-3/BS82D20A-3
Touch Key 8-Bit Flash MCU with LED/LCD Driver
Watchdog Timer
TheWatchdogTimerisprovidedtopreventprogrammalfunctionsorsequencesfromjumpingto
unknownlocations,duetocertainuncontrollableexternaleventssuchaselectricalnoise.
Watchdog Timer Clock Source
TheWatchdogTimerclocksourceisprovidedbytheinternalf
SUB
clock,dependingonthedevices,
thef
SUB
clockisinturnsuppliedbytheLIRCoscillatororeithertheLXTorLIRCoscillatorselected
byacongurationoption.TheLIRCinternaloscillatorhasanapproximatefrequencyof32kHzand
thisspeciedinternalclockperiodcanvarywithV
DD
,temperatureandprocessvariations.TheLXT
oscillatorissuppliedbyanexternal32.768kHzcrystal.TheWatchdogTimersourceclockisthen
subdividedbyaratioof2
8
to2
18
togivelongertimeouts,theactualvaluebeingchosenusingthe
WS2~WS0bitsintheWDTCregister.
Watchdog Timer Control Register
Asingleregister,WDTC,controlstherequiredtimeoutperiodaswellastheenableoperation.The
WDTCregisterisinitiatedto01010011BatanyresetexceptWDTtime-outhardwarewarmreset.
WDTC Register
Bit 7 6 5 4 3 2 1 0
Name WE4
WE3 WE2 WE1 WE0 WS2 WS1 WS0
R/W R/W R/W R/W R/W R/W R/W R/W R/W
POR 0 1 0 1 0 0 1 1
Bit7~3 WE4 ~ WE0:WDTfunctionsoftwarecontrol
01010Bor10101B:Enabled
Othervalues:ResetMCU(Resetwillbeactiveafter2~3LIRCclockfordebouncetime.)
IftheMCUresetiscausedbytheWE[4:0]inWDTCsoftwarereset,theWRFagof
CTRLregisterwillbeset.
B
it2~0 WS2 ~ WS0:WDTTime-outperiodselection
000:2
8
/f
SUB
001:2
10
/f
SUB
010:2
12
/f
SUB
011:2
14
/f
SUB
100:2
15
/f
SUB
101:2
16
/f
SUB
110:2
17
/f
SUB
111:2
18
/f
SUB
Thesethreebitsdeterminethedivision ratio of theWatchdogTimersourceclock,
whichinturndeterminesthetimeoutperiod.