Texas Instruments TMS320DM357 Switch User Manual


 
3.3.2.3ReceiveDMAState
USBControllerHostandPeripheralModesOperation
www.ti.com
Table13.ReceiveBufferDescriptorWord3
BitFieldValueDescription
31SOPStartofPacket:SOPIndicatesthatthedescriptorbufferisthefirstbufferinthepacket.Software
shouldcleartheSOPbitwhensettingupthedescriptor.
0Notstartofpacketbuffer
1Startofpacketbuffer
30EOPEndofPacket:EOPIndicatesthatthedescriptorbufferisthelastbufferinthepacket.Software
shouldcleartheEOPbitwhensettingupthedescriptor.
0Notendofpacketbuffer
1Endofpacketbuffer
29OwnershipTheOwnershipbitindicatesownershipoftheDMApacketandisvalidonlyonSOP.Thisbitis
setbythesoftwareandclearedbytheDMAcontrollerwhenthepackethasbeentransmitted.
Thesoftwarecanusethisbittoreclaimbuffers.
0Thepacketisownedbythehostprocessor.
1ThepacketisownedbytheDMAcontroller.
28EOQEndofQueue:TheEndofQueuebitissetbytheDMAcontrollertoindicatethatallpacketsin
thequeuehavebeentransmittedandtheTxqueueisempty.ThisbitisvalidonlyonwhenEOP
isset.Softwareshouldclearthisbitwhensettingupthedescriptor.
0TheTxqueuehasmorepacketstotransfer.
1TheDMAcontrollertookthisdescriptorbufferasthelastbufferdescriptorinthelastpacketin
thequeue.
27:24ReservedReserved
23ZeroByteZeroBytePacketIdentifier.ThisbitissetbytheDMAcontrollerwhenazerobyteUSBpacket
hasbeenreceived.SoftwareshouldignorethePacketLengthwhenthisbitisset.
22:16ReservedReserved
15:0PacketLengthThelengthoftheDMApacketinbytes.ThisfieldisvalidonlyonSOPandiswrittenbytheDMA
controller.IfthePacketLengthislessthanthesumofthebufferlengths,thenthepacketdata
willbetruncated.SoftwareshouldignorethePacketLengthwhenZeroByteisset.
FourdifferentcasesarepossibleforthenumberofbuffersinaDMApacket:
1.BufferDescriptorcontainsStartofPacketfieldandEndofPacketfield(1bufferinDMApacket)
2.BufferDescriptorcontainsStartofPacketfieldonly(2+buffersinDMApacket)
3.BufferDescriptorcontainsEndofPacketfieldonly(2+buffersinDMApacket)
4.BufferDescriptordoesnotcontaineitherofStartofPacketfieldandEndofPacketfield(3+buffersin
packet)
TheDMAcontrollerstoresandmaintainsstateinformationforeachreceivechannel.Thestateinformation
isreferredtoastheRxDMAState.TheRxDMAStateisacombinationofcontrolfieldsandDMA
controllerspecificscratchpadspaceusedtomanipulatedatastructuresandreceiveDMApackets.TheRx
DMAStateisstoredinregistersRCPPIDMASTATEW0,RCPPIDMASTATEW1,RCPPIDMASTATEW2,
RCPPIDMASTATEW3,RCPPIDMASTATEW4,RCPPIDMASTATEW5,RCPPIDMASTATEW6and
RCPPICOMPPTRforeachchannel.
Eachchannelhasonereceivequeuethathasaheaddescriptorpointerandonecompletionpointer.
ThefollowinginformationisstoredintheTxDMAState:
RCPPIDMASTATEW0:RxQueueHeadDescriptorPointer
RCPPICOMPPTR:RxCompletionPointer
RCPPIDMASTATEW2:StartofPacketBufferDescriptorPointer
RCPPIDMASTATEW3:CurrentBufferDescriptorPointer
RCPPIDMASTATEW4:CurrentBufferPointer
RCPPIDMASTATEW5:RemainingDMAPacketLengthandActualDMAPacketLength
UniversalSerialBus(USB)Controller 64SPRUGH3November2008
SubmitDocumentationFeedback