毕业设计外文文献翻译.docx
《毕业设计外文文献翻译.docx》由会员分享,可在线阅读,更多相关《毕业设计外文文献翻译.docx(19页珍藏版)》请在冰豆网上搜索。
毕业设计外文文献翻译
学校代码:
10128
学号:
201020205056
本科毕业设计外文文献翻译
(
题目:
PacketHandlingHardwareSupport
学生姓名:
学院:
系别:
专业:
班级:
指导教师:
二〇一四年六月
PacketHandlingHardwareSupport
参考文献:
TexasInstruments.CC1101Low-PowerSub-1GHzRFTransceiver.www..2013
TheCC1101hasbuilt-inhardwaresupportforpacketorientedradioprotocols.
Intransmitmode,thepackethandlercanbeconfiguredtoaddthefollowingelementstothepacketstoredintheTXFIFO:
●Aprogrammablenumberofpreamblebytes
●Atwobytesynchronization(sync)word.Canbeduplicatedtogivea4-bytesyncword(recommended).Itisnotpossibletoonlyinsertpreambleoronlyinsertasyncword
●ACRCchecksumcomputedoverthedatafield.
Therecommendedsettingis4-bytepreambleand4-bytesyncword,exceptfor500kBauddataratewheretherecommendedpreamblelengthis8bytes.Inaddition,thefollowingcanbeimplementedonthedatafieldandtheoptional2-byteCRCchecksum:
●WhiteningofthedatawithaPN9sequence
●ForwardErrorCorrection(FEC)bytheuseofinterleavingandcodingofthedata(convolutionalcoding)
Inreceivemode,thepackethandlingsupportwillde-constructthedatapacketbyimplementingthefollowing(ifenabled):
●Preambledetection
●Syncworddetection
●CRCcomputationandCRCcheck
●Onebyteaddresscheck
●Packetlengthcheck(lengthbytecheckedagainstaprogrammablemaximumlength)
●De-whitening
●De-interleavinganddecoding
Optionally,twostatusbytes(seeTable27andTable28)withRSSIvalue,LinkQualityIndication,andCRCstatuscanbeappendedintheRXFIFO.
Table27:
ReceivedPacketStatusByte1(firstbyteappendedafterthedata)
Bit
FieldName
Description
7:
0
RSSI
RSSIvalue
Table28:
ReceivedPacketStatusByte2(secondbyteappendedafterthedata)
Bit
FieldName
Description
7
CRC_OK
1:
CRCforreceiveddataOK
(orCRCdisabled)
0:
CRCerrorinreceiveddata
6:
0
LQI
Indicatingthelinkquality
Note:
RegisterfieldsthatcontrolthepackethandlingfeaturesshouldonlybealteredwhenCC1101isintheIDLEstate.
1.Datawhitening
Fromaradioperspective,theidealovertheairdataarerandomandDCfree.Thisresultsinthesmoothestpowerdistributionovertheoccupiedbandwidth.Thisalsogivestheregulationloopsinthereceiveruniformoperationconditions(ondatadependencies).
Realdataoftencontainlongsequencesofzerosandones.Inthesecases,performancecanbeimprovedbywhiteningthedatabeforetransmitting,andde-whiteningthedatainthereceiver.
WithCC1101,thiscanbedoneautomatically.BysettingPKTCTRLO.WHITE_DATA=1,alldata,exceptthepreambleandthesyncwordwillbeXOR-edwitha9-bitpseudo-random(PN9)sequencebeforebeingtransmitted.ThisisshowninFigure16.Atthereceiverend,thedataareXOR-edwiththesamepseudorandomsequence.Inthisway,thewhiteningisreversed,andtheoriginaldataappearinthereceiver.ThePN9sequenceisinitializedtoall1’s.
2.PacketFormat
Theformatofthedatapacketcanbeconfiguredandconsistsofthefollowingitems(seeFigure17):
●Preamble
●Synchronizationword
●Optionallengthbyte
●Optionaladdressbyte
●Payload
●Optional2byteCRC
Thepreamblepatternisanalternatingsequenceofonesandzeros(10101010…).TheminimumlengthofthepreambleisprogrammablethroughthevalueofMDMCFG1.NUM_PREAMBLE.WhenenablingTX,themodulatorwillstarttransmittingthepreamble.Whentheprogrammednumberofpreamblebyteshasbeentransmitted,themodulatorwillsendthesyncwordandthendatafromtheTXFIFOifdataisavailable.IftheTXFIFOisempty,themodulatorwillcontinuerosendpreamblebytesuntilthefirstbyteiswrittentotheTXFIFO.Themodulatorwillthensendthesyncwordandthenthedatabytes.
Thesynchronizationwordisatwo-bytevaluesetintheSYNC1andSYNC0registers.Thesyncwordprovidesbytesynchronizationoftheincomingpacket.Aone-bytesyncwordcanbeemulatedbysettingtheAYNC1valuetothepreamblepattern.Itisalsopossibletoemulatea32bitsyncwordbysettingMDMCFG2.SYNC_MODEto3or7.Thesyncwordwillthenberepeatedtwice.
CC1101supportsbothconstantpacketlengthprotocolsandvariablelengthprotocols.Variableorfixedpacketlengthmodecanbeusedforpacketsupto255bytes.Forlongerpackets,infinitepacketlengthmodemustbeused.
FixedpacketlengthmodeisselectedbysettingPKTCTRL0.LENGTH_CONFIG=0.ThedesiredpacketlengthissetbythePKTLENregister.Thisvaluemustbedifferentfrom0.
Invariablepacketlengthmode,PKTCTRL0.LENGTH_CONFIG=1,thepacketlengthisconfiguredbythefirstbyteafterthesyncword.Thepacketlengthisdefinedasthepayloaddata,excludingthelengthbyteandoptionalCRC.ThePKTLENregisterisusedtosetthemaximumpacketlengthallowedinRX.AnypacketreceivedwithalengthbytewithavaluegreaterthanPKTLENwillbediscarded.ThePKTLENvaluemustbedifferentfrom0.ThebytewrittentotheTXFIFOmustbedifferentfrom0.
WithPKTCTRL0.LENGTH_CONFIG=2,thepacketlengthissettoinfiniteandtransmissionandreceptionwillcontinueuntilturnedoffmanually.Asdescribedinthenextsection,thiscanbeusedtosupportpacketformatswithdifferentlengthconfigurationthannativelysupportedbyCC1101.oneshouldmakesurethatTXisnotturnoffduringthetransmissionofthefirsthalfofanybyte.RefertotheCC1101ErrataNotes[4]formoredetails.
Note:
Theminimumpacketlengthsupported(excludingtheoptionallengthbyteandCRC)isonebyteofpayloaddata.
2.1ArbitraryLengthFieldConfiguration
Thepacketlengthregister,PKTLEN,canbereprogrammedduringreceiveandtransmit.Incombinationwithfixedpacketlengthmode(PKTCTRL0.LENGTH_CONFIG=0),thisopensthepossibilitytohaveadifferentlengthfieldconfigurationcansupportedforvariablelengthpackets(invariablepacketlengthmodethelengthbyteisthefirstbyteafterthesyncword).Atthestartofreception,thepacketlengthissetalargevalue.TheMCUreadsoutenoughbytestointerpretthelengthfieldinthepacket.ThenthePKTLENvalueissetaccordingtothisvalue.TheendofpacketwilloccurwhenthebytecounterinthepackethandlerisequaltothePKTLENregister.Thus,theMCUmustbeabletoprogramthecorrectlength,beforetheinternalcounterreachesthepacketlength.
2.2PacketLength>255
Thepacketautomationcontrolregister,PKTCTRL0,canbereprogrammedduringTXandRX.Thisopensthepossibilitytotransmitandreceivepacketsthatarelongerthan256bytesandstillbeabletousethepackethandlinghardwaresupport.Atthestartofthepacket,theinfinitepacketlengthmode(PKTCTRL0.LENGTH_CONFIG=2)mustbeactive.OntheTXside,thePKTLENregisterissettomod(length,256).OntheRXsidetheMCUreadsoutenoughbytestointerpretthelengthfieldinthepacketandsetsthePKTLENregistertomod(length,256).Whenlessthan256bytesremainsofthepacket,theMCUdisablesinfinitepacketlengthmodeandactivatesfixedpacketlengthmode.WhentheinternalbytecounterreachesthePKTLENvalue,thetransmissionorreceptionends(theradioentersthestatedeterminedbyTXOFF_MODEorRXOFF_MODE).AutomaticCRCappending/checkingcanalsobeused(bysettingPKTCTRL0.CRC_EN=1).
Whenforexamplea600-bytepacketistobetransmitted,theMCUshoulddothefollowing(seealsoFigure18)
●SetPKTCTRL0.LENGTH_CONFIG=2.
●Pre-programthePKTLENregistertomod(600,256)=88.
●Transmitatleast345bytes(600-255),forexamplebyfillingthe64-byteTXFIFOsixtimes(384bytestransmitted).
●SetPKTCTRL0.LENGTH_CONFIG=0.
●Thetransmissionendswhenthepacketcounterreaches88.atotalof600bytesaretransmitted.
3PacketfilteringinReceiveMode
CC1101supportsthreedifferenttypesofpacket-filtering;addressfiltering,maximumlengthfiltering,andCRCfiltering.
3.1AddressingFiltering
SettingPKTCTRL1.ADR_CHKtoanyothervaluethanzeroenablesthepacketaddressfilter.ThepackethandlerenginewillcomparethedestinationaddressbyteinthepacketwiththeprogrammednodeaddressintheADDRregisterandthe0*00broadcastaddresswhenPKTCTRL1.ADR_CHK=10orboththe0*00and0*FFbroadcastaddresseswhenPKTCTRL1.ADR_CHK=11.Ifthereceivedaddressmatchesavalidaddress,thepacketisreceivedandwrittenintotheRXFIFO.Iftheaddressmatchfails,thepacketisdiscardedandreceivemoderestarted(regardlessoftheMCSM1.RXOFF_MODEsetting).
Ifthereceivedaddressmatchesavalidaddresswhenusinginfinitepacketlengthmodeandaddressfilteringisenabled,0*FFwillbewrittenintotheRXFIFOfollowedbytheaddressbyteandthenthepayloaddata.
3.2MaximumLengthFiltering
Invariablepacketlengthmode,PKTCTRL0.LENGTH_CONFIG=1,thePKTLEN.PACKET_LENGTHregistervalueisusedtosetthemaximumallowedpacketlength.Ifthereceivedlengthbytehasalargervaluethanthis,thepacketisdiscardedandreceivemoderestarted(regardlessoftheMCSM1.RXOFF_MODEsetting).
3.3CRCFiltering
ThefilteringofapacketwhenCRCcheckfailsisenabledbysettingPKTCTRL1.CRC_AUTOFLUSH=1.TheCRCautoflushfunctionwillflushtheentireRXFIFOiftheCRCcheckfails.AfterautoflushingtheRXFIFO,thenextstatedependsontheMCSM1.RXOFF_MODEsetting.
Whenusingtheautoflushfunction,themaximumpacketlengthis63bytesinvariablepacketlengthmode.NotethatwhenPKTCTRL1APPEND_STATUSisenabled,themaximumallowedpacketlengthisreducedbytwobytesinordertomakeroomintheRXFIFOforthetwostatusbytesappendedattheendofthepacket.SincetheentireRXFIFOisflushedwhentheCRCcheckfails,thepreviouslyreceivedpacketmustbereadoutoftheFIF