Rev. 2.50 254 June 22, 2017 Rev. 2.50 255 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
Managing Receiver Errors
SeveraltypesofreceptionerrorscanoccurwithintheUARTmodule,thefollowingsectiondescribes
thevarioustypesandhowtheyaremanagedbytheUART.
• OverrunError–OERRag
TheRXRregisteriscomposedofafourbytedeepFIFOdatabuffer,wherefourbytescanbeheld
intheFIFOregister,whilea5thbytecancontinuetobereceived.Beforethe5thbytehasbeen
entirelyshiftedin,thedatashouldbereadfromtheRXRregister.Ifthisisnotdone,theoverrun
erroragOERRwillbeconsequentlyindicated.
Intheeventofanoverrunerroroccurring,thefollowingwillhappen:
♦
TheOERRagintheUSRregisterwillbeset.
♦
TheRXRcontentswillnotbelost.
♦
Theshiftregisterwillbeoverwritten.
♦
AninterruptwillbegeneratediftheRIEbitisset.
TheOERRagcanbeclearedbyanaccesstotheUSRregisterfollowedbyareadtotheRXR
register.
•
NoiseError–NFag
Over-samplingisusedfordatarecoverytoidentifyvalidincomingdataandnoise.Ifnoiseis
detectedwithinaframe,thefollowingwilloccur:
♦
Thereadonlynoiseag,NF,intheUSRregisterwillbesetontherisingedgeoftheRXIFbit.
♦
DatawillbetransferredfromtheshiftregistertotheRXRregister.
♦
Nointerruptwillbegenerated.HoweverthisbitrisesatthesametimeastheRXIFbitwhich
itselfgeneratesaninterrupt.
NotethattheNFagisresetbyaUSRregisterreadoperationfollowedbyanRXRregisterread
operation.
•
FramingError–FERRag
Thereadonlyframingerrorag,FERR,intheUSRregister,issetifazeroisdetectedinsteadof
stopbits.Iftwostopbitsareselected,bothstopbitsmustbehigh.OtherwisetheFERRagwill
beset.TheFERRagisbufferedalongwiththereceiveddataandisclearedinanyreset.
• ParityError–PERRag
Thereadonlyparityerrorag,PERR,intheUSRregister,issetiftheparityofthereceived
wordisincorrect.Thiserroragisonlyapplicableiftheparityfunctionisenabled,PREN=1,and
iftheparitytype,oddoreven,isselected.ThereadonlyPERRagisbufferedalongwiththe
receiveddatabytes.Itisclearedonanyreset,itshouldbenotedthattheFERRandPERRags
arebufferedalongwiththecorrespondingwordandshouldbereadbeforereadingthedataword.