Texas Instruments TMS320DM357 Switch User Manual


 
3.3.2.2CPPIReceiveBufferDescriptor
www.ti.com
USBControllerHostandPeripheralModesOperation
RxbufferdescriptorsprovideinformationaboutasinglecorrespondingRxdatabuffer.EveryRxbufferhas
asingleRxbufferdescriptorthatstoresthefollowinginformation:
Pointertothedatabuffer
Pointertothenextbufferdescriptorinthequeue
Bufferlengthandoffsettothefirstvalidbyteofbufferdata
StartofDMApacket(SOP)indicator
EndofDMApacket(EOP)indicator
Ownership(onlyvalidwithSOP)
Endofqueue(EOQ)(onlyvalidonEOP)
PacketLength(onlyvalidwithSOP)
Receivebufferdescriptorscontain16bytes(4words)andmustbeginon16-bytealignedaddresses.
Receivebufferdescriptorsmaybelinkedtogethertoformpackets.BufferdescriptorSOPandEOPbits
areusedtodelimitpackets.Packetsinturnmaybelinkedtogethertoformreceivequeue.Eachqueue
consistsofachainofbufferdescriptorslinkedtogetherbyNextDescriptorPointers.Thelastbuffer
descriptorinaqueuehasazeroNextDescriptorPointer.Eachdescriptorpointstoadatabufferyieldinga
queueofbuffers.
FourWordsofReceiveBufferDescriptoraredescribedinTable10throughTable13.
Table10.ReceiveBufferDescriptorWord0
BitsNameDescription
31:0NextDescriptorThe32-bitwordalignedmemoryaddressofthenextbufferdescriptorintheRxqueue.Thisisthe
Pointermechanismusedtoreferencethenextbufferdescriptorfromthecurrentbufferdescriptor.Ifthe
valueofthispointeriszerothenthecurrentbufferisthelastbufferinthequeue.Thesoftwaresets
theNextDescriptorPointer.
Table11.ReceiveBufferDescriptorWord1
BitsNameDescription
31:0BufferPointerTheBufferPointeristhebytealignedmemoryaddressofthebufferassociatedwiththebuffer
descriptor.ThesoftwaresetstheBufferPointer.
Table12.ReceiveBufferDescriptorWord2
BitsNameDescription
31:16BufferOffsetTheBufferOffsetindicateshowmanyunusedbytesareatthestartofthebuffer(SOPbuffersonly).
Avalueofzeroindicatesthattherearenounusedbytesatthestartofthebufferandthatvaliddata
beginsonthefirstbyteofthebuffer.Avalueof000Fh(decimal15)indicatesthatthefirst15bytes
ofthebufferaretobeignoredbytheDMAcontrollerwhiletransmittingandthatvalidbufferdata
startsonbyte16ofthebuffer.Thesoftwaresetsthebufferoffsettozeroonbufferinitializationand
theDMAcontrolleroverwritesthezerovalueonSOPpacketswiththeRxDMAStatebufferoffset
value.
15:0BufferLengthTheBufferLengthfieldindicateshowmanyvaliddatabytesareinthebuffer.Unusedorprotocol
specificbytesatthebeginningofthebufferarenotcountedintheBufferLengthfield.Thesoftware
setsthebufferlengthonbufferinitialization.TheDMAcontrollerwilloverwritethesoftwareinitialized
valueonanEOPbufferwhenthenumberofreceiveddatabytesislessthanthehostinitiatedvalue.
TheDMAcontrollerwilloverwritethehostinitializedvalueonSOPwhentheBufferOffsetisgreater
thanzero,orthePacketLengthislessthanthebufferlength.
SPRUGH3November2008UniversalSerialBus(USB)Controller63
SubmitDocumentationFeedback