3.3.1.6TransparentModeandRNDISModeTransmitDMAOperation
www.ti.com
USBControllerHostandPeripheralModesOperation
cleartheOwnershipbitintheDMApacket’sSOPbufferdescriptorandissueaninterrupttotheprocessor
bywritingtheDMApacket’slastbufferdescriptoraddresstothequeue’sTxDMAStateCompletion
Pointer(TCPPICOMPPTRregister).Whenthelastpacketinaqueuehasbeentransmitted,theDMA
controllersetstheEndOfQueuebitintheEOPbufferdescriptor,clearstheOwnershipbitintheSOP
Descriptor,zeroestheappropriateDMAstateheaddescriptorpointer,andthenissuesaTxinterruptto
thehostbywritingaddressofthelastbufferdescriptorprocessedbytheDMAcontrollertothequeue’s
associatedTxcompletionpointer(TCPPICOMPPTRregister).
Oninterruptfromtheport,thesoftwarecanprocessthebufferqueue,detectingtransmittedpacketsbythe
statusoftheOwnershipbitintheSOPbufferdescriptor.IftheOwnershipbitisclearedtozero,thenthe
packethasbeentransmittedandthesoftwaremayreclaimthebuffersassociatedwiththepacket.The
softwarecontinuesqueueprocessinguntiltheendofthequeueoruntilaSOPbufferdescriptorisread
thatcontainsasetOwnershipbitindicatingthatthepackettransmissionisnotcomplete.Thesoftware
determinesthatallpacketsinthequeuehavebeentransmittedwhenthelastpacketinthequeuehasa
clearedOwnershipbitintheSOPbufferdescriptor,theEndofQueuebitissetinthelastpacketEOP
bufferdescriptor,andtheNextDescriptorPointerofthelastpacketEOPbufferdescriptoriszero.
Thesoftwareacknowledgesaninterruptbywritingtheaddressofthelastbufferdescriptortothequeue’s
associatedTxCompletionPointer(TCPPICOMPPTRregister).
IfthesoftwarewrittenbufferaddressvalueinTCCPICOMPPTRregisterisdifferentfromthebuffer
addresswrittenbytheDMAcontrollerafterTxcompletion,thentheinterruptfortheTxChannelremains
asserted.Ifthesoftware-writtenbufferaddressvaluematcheswiththebufferaddresswrittenbytheDMA
controller,theTxChannelinterruptgetsdeasserted.
Amisqueuedpacketconditionmayoccurwhenthesoftwareaddsapackettoaqueuefortransmissionas
theDMAcontrollerfinishestransmittingthepreviouslastpacketinthequeue.Themisqueuedpacketis
detectedbythesoftwarewhenqueueprocessingdetectsaclearedOwnershipbitintheSOPbuffer
descriptor,asetEndofQueuebitintheEOPbufferdescriptor,andanonzeroNextDescriptorPointerin
theEOPbufferdescriptor.AmisqueuedpacketmeansthattheDMAcontrollerreadthelastEOPbuffer
descriptorbeforethehostaddedthenewlastpackettothequeue,sotheDMAcontrollerdetermined
queueemptyjustbeforethelastpacketwasadded.Thehostsoftwarecorrectsthemisqueuedpacket
conditionbyinitiatinganewpackettransferforthemisqueuedpacketbywritingthemisqueuedpacket’s
SOPbufferdescriptoraddresstotheheaddescriptorpointerinTCCPIDMASTATEW0register.
TransparentModeDMAoperationisthedefaultDMAmode(asdescribedinprevioussection)wherean
interruptisgeneratedwheneveraDMApacketistransmitted.Inthetransparentmode,DMApacketsize
cannotbegreaterthanUSBMaxPktSizeandFIFOsizefortheendpoint.Thismeans,fortransmittingsay
‘n’USBpackets,theDMAcontrollershouldbeprogrammedwithaqueueof‘n’DMApackets.Transparent
modemustbeusedwheneverUSBMaxPktSizefortheendpointisnotamultipleof64bytes.
RNDISmodeDMAisusedtotransmitDMApacketswhicharelargerthanUSBMaxPktSize.Thisis
accomplishedbybreakingthelargerpacketintosmallerpackets,notlargerthanUSBMaxPktSize.This
impliesthatthedatatobetransmittedwillbesentoverUSBinmultiplepacketsofMaxPktSizeandtheTx
DMAinterruptforthechannelisgeneratedafterthetransmissionofcompleteDMApacket.Thismodeof
DMAisusedforRNDIStypetransfersoverUSB.Theprotocoldefinestheendofthecompletetransferby
sendingashortUSBpacket(smallerthanUSBMaxPktSizeasmentionedinUSBspecification2.0).Ifthe
DMApacketsizeisanexactmultipleofUSBMaxPktSize,theDMAcontrollersendsazerobytepacketat
theendofcompletetransfertosignifythecompletionofthetransfer.
RNDISModeDMAissupportedonlywhenUSBMaxPktSizeandtheassociatedFIFOsizeisanintegral
multipleof64bytes.
SPRUGH3–November2008UniversalSerialBus(USB)Controller61
SubmitDocumentationFeedback