Rev. 1.20 132 January 23, 2015 Rev. 1.20 133 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
UART Power Down and Wake-up
Whenthethedevicesystemclockisswitchedoff,theUARTwillceasetofunction.Ifthedevice
executesthe"HALT"instructionandswitchesoffthesystemclockwhileatransmissionisstill
inprogress,thenthetransmissionwillbepauseduntiltheUARTclocksourcederivedfromthe
microcontrollerisactivated.Inasimilarway,ifthedevice executesthe"HALT"instructionand
switchesoffthesystemclockwhilereceivingdata,thenthereceptionofdatawilllikewisebe
paused.WhenthedeviceenterstheIDLEorSLEEPMode,notethattheUSR,UCR1,UCR2,
transmitandreceiveregisters,aswellastheBRGregisterwillnotbeaffected.Itisrecommended
tomakesurefirstthattheUARTdatatransmissionorreceptionhasbeenfinishedbeforethe
microcontrollerenterstheIDLEorSLEEPmode.
TheUARTfunctioncontainsareceiverRXpinwake-upfunction,whichisenabledordisabled
bytheWAKEbitintheUCR2register.Ifthisbit,alongwiththeUARTenablebit,UARTEN,the
receiverenablebit,RXENandthereceiverinterruptbit,RIE,areallsetbeforethedeviceentersthe
IDLE0orSLEEPMode,thenafallingedgeontheRXpinwillwakeupthedevicefromtheIDLE0
orSLEEPMode.Notethatasittakescertainsystemclockcyclesafterawake-up,beforenormal
microcontrolleroperationresumes,anydatareceivedduringthistimeontheRXpinwillbeignored.
ForaUARTwake-upinterrupttooccur,inadditiontothebitsforthewake-upbeingset,theglobal
interruptenablebit,EMI,andtheUARTinterruptenablebit,UARTE,mustalsobeset.Ifthesetwo
bitsarenotsetthenonlyawakeupeventwilloccurandnointerruptwillbegenerated.Notealso
thatasittakescertainsystemclockcyclesafterawake-upbeforenormalmicrocontrollerresumes,
theUARTinterruptwillnotbegenerateduntilafterthistimehaselapsed.