3.3.1.3TransmitDMAState
www.ti.com
USBControllerHostandPeripheralModesOperation
Table9.TransmitBufferDescriptorWord3(continued)
BitsNameValueDescription
28EOQEndofQueue:TheEndofQueuebitissetbytheDMAcontrollertoindicatethatallpackets
inthequeuehavebeentransmittedandtheTxqueueisempty.Thisbitisvalidonlyonwhen
EOPisset.
0TheTxqueuehasmorepacketstotransfer
1TheDMAcontrollertookthisdescriptorbufferasthelastbufferdescriptorinthelastpacketin
thequeue
27:24ReservedReserved
23ZeroByteZeroBytePacketIdentifier.ThisbitissetbythesoftwarewhenazerobyteUSBpacket
needstobetransmitted.ThisbittellstheDMAcontrollerthatnodatatransferneedstobe
donefortransmittingthiszerobytedatabuffer.SetthePacketLengthto1whensettingthis
bit.
22:16ReservedReserved
15:0PacketLengthThelengthoftheDMApacketinbytes.ThisfieldisvalidonlyonSOPandiswrittenbythe
software.IfthePacketLengthislessthanthesumofthebufferlengths,thenthepacketdata
willbetruncated.APacketLengthgreaterthanthesumofthebuffersisasoftwareerror.
PacketLengthmustbenonzero.SettoonewhensettingtheZeroBytebit.
FourdifferentcasesarepossibleforthenumberofbuffersinaDMApacket:
1.BufferDescriptorcontainsStartofPacketfieldandEndofPacketfield(1bufferinDMApacket).
2.BufferDescriptorcontainsStartofPacketfieldonly(2+buffersinDMApacket).
3.BufferDescriptorcontainsEndofPacketfieldonly(2+buffersinDMApacket).
4.BufferDescriptordoesnotcontaineitherofStartofPacketfieldandEndofPacketfield(3+buffersin
packet).
TheDMAcontrollerstoresandmaintainsstateinformationforeachtransmitchannel.Thestate
informationisreferredtoastheTxDMAState.TheTxDMAStateisacombinationofcontrolfieldsand
DMAcontrollerspecificscratchpadspaceusedtomanipulatedatastructuresandtransmitDMApackets.
TheTxDMAStateisstoredinregistersTCPPIDMASTATEW0,TCPPIDMASTATEW1,
TCPPIDMASTATEW2,TCPPIDMASTATEW3,TCPPIDMASTATEW4,TCPPIDMASTATEW5and
TCPPICOMPPTRforeachchannel.
Eachchannelhasonequeue.Thequeuehasoneheaddescriptorpointerandonecompletionpointer.
ThefollowinginformationisstoredintheTxDMAState:
•TCPPIDMASTATEW0:TxQueueHeadDescriptorPointer(s)
•TCPPICOMPPTR:TxCompletionPointer(s)
•TCPPIDMASTATEW1:StartofPacketBufferDescriptorPointer
•TCPPIDMASTATEW2:CurrentBufferDescriptorPointer
•TCPPIDMASTATEW3:CurrentBufferPointer
•TCPPIDMASTATEW5:RemainingDMAPacketLengthandActualDMAPacketLength
SPRUGH3–November2008UniversalSerialBus(USB)Controller59
SubmitDocumentationFeedback