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
Wake-up
AfterthesystementerstheSLEEPorIDLEMode,itcanbewokenupfromoneofvarioussources
listedasfollows:
• AnexternalfallingedgeonPortA
• Asysteminterrupt
• AWDToverow
IfthedeviceiswokenupbyaWDToverow,aWatchdogTimerresetwillbeinitiated.ThePDF
agisclearedbyasystempower-uporexecutingtheclearWatchdogTimerinstructionsandisset
whenexecutingthe"HALT"instruction.TheTOagissetifaWDTtime-outoccurs,andcauses
awake-upthatonlyresetstheProgramCounterandStackPointer,theotheragsremainintheir
originalstatus.
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.
System Oscillator
Wake-up Time
(SLEEP Mode)
Wake-up Time
(IDLE0 Mode)
Wake-up Time
(IDLE1 Mode)
HIRC
15~16 HIRC cycles 1~2 HIRC cycles
LIRC 1~2 LIRC cycles 1~2 LIRC cycles
LXT 1024 LXT cycles 1~2 LXT cycles
Wake-Up Time
Programming Considerations
ThehighspeedandlowspeedoscillatorsbothusethesameSSTcounter.Forexample,ifthesystem
iswokenupfromtheSLEEPModetheHIRCoscillatorneedstostart-upfromanoffstate.
IfthedeviceiswokenupfromtheSLEEPModetotheNORMALMode,thehighspeedsystem
oscillatorneedsanSSTperiod.ThedevicewillexecutetherstinstructionafterHTOishigh.At
thistime,theLXToscillatormaynotbestabilityiff
SUB
isfromLXToscillator.Thesamesituation
occursinthepower-onstate.TheLXToscillatorisnotreadyyetwhenthefirstinstructionis
executed.