Rev. 2.50 66 June 22, 2017 Rev. 2.50 67 June 22, 2017
HT66F20/HT66F30/HT66F40/HT66F50/HT66F60
HT66FU30/HT66FU40/HT66FU50/HT66FU60
A/D Flash MCU with EEPROM
HT66F20/HT66F30/HT66F40/HT66F50/HT66F60
HT66FU30/HT66FU40/HT66FU50/HT66FU60
A/D Flash MCU with EEPROM
Wake-up
AfterthesystementerstheSLEEPorIDLEMode,itcanbewokenupfromoneofvarioussources
listedasfollows:
• Anexternalreset
• AnexternalfallingedgeonPortA
• Asysteminterrupt
• AWDToverow
Ifthesystemiswokenupbyanexternalreset,thedevicewillexperienceafullsystemreset,
however,ifthedeviceiswokenupbyaWDToverow,aWatchdogTimerresetwillbeinitiated.
Althoughbothofthesewake-upmethodswillinitiatearesetoperation,theactualsourceofthe
wake-upcanbedeterminedbyexaminingtheTOandPDFflags.ThePDFflagisclearedbya
systempower-uporexecutingtheclearWatchdogTimerinstructionsandissetwhenexecutingthe
“HALT”instruction.TheTOagissetifaWDTtime-outoccurs,andcausesawake-upthatonly
resetstheProgramCounterandStackPointer,theotheragsremainintheiroriginalstatus.
EachpinonPortAcanbesetupusingthePAWUregistertopermitanegativetransitiononthepin
towake-upthesystem.WhenaPortApinwake-upoccurs,theprogramwillresumeexecutionat
theinstructionfollowingthe"HALT"instruction.Ifthesystemiswokenupbyaninterrupt,then
twopossiblesituationsmayoccur.Therstiswheretherelatedinterruptisdisabledortheinterrupt
isenabledbutthestackisfull,inwhichcasetheprogramwillresumeexecutionattheinstruction
followingthe"HALT"instruction.Inthissituation,theinterruptwhichwoke-upthedevicewillnot
beimmediatelyserviced,butwillratherbeservicedlaterwhentherelatedinterruptisnallyenabled
orwhenastacklevelbecomesfree.Theothersituationiswheretherelatedinterruptisenabledand
thestackisnotfull,inwhichcasetheregularinterruptresponsetakesplace.Ifaninterruptrequest
flagissethighbeforeenteringtheSLEEPorIDLEMode,thewake-upfunctionoftherelated
interruptwillbedisabled.
Programming Considerations
TheHXTandLXToscillatorsbothusethesameSSTcounter.Forexample,ifthesystemiswoken
upfromtheSLEEP0ModeandboththeHXTandLXToscillatorsneedtostart-upfromanoffstate.
TheLXToscillatorusestheSSTcounterafterHXToscillatorhasnisheditsSSTperiod.
• IfthedeviceiswokenupfromtheSLEEP0ModetotheNORMALMode,thehighspeedsystem
oscillatorneedsanSSTperiod.ThedevicewillexecuterstinstructionafterHTOis"1"Atthis
time,theLXToscillatormaynotbestabilityiff
SUB
isfromLXToscillator.Thesamesituation
occursinthepower-onstate.TheLXToscillatorisnotreadyyetwhentherstinstructionis
executed.
•
IfthedeviceiswokenupfromtheSLEEP1ModetoNORMALMode,andthesystemclock
sourceisfromHXToscillatorandFSTENis"1",thesystemclockcanbeswitchedtotheLXTor
LIRCoscillatorafterwakeup.
• Thereareperipheralfunctions,suchasWDT,TMsandSIM,forwhichthef
SYS
isused.Ifthe
systemclocksourceisswitchedfromf
H
tof
L
,theclocksourcetotheperipheralfunctions
mentionedabovewillchangeaccordingly.
• Theon/offconditionoff
SUB
andf
S
dependsuponwhethertheWDTisenabledordisabledasthe
WDTclocksourceisselectedfromf
SUB
.