3.3.2.8DMATeardownProcedure
3.4InterruptHandling
USBControllerHostandPeripheralModesOperation
www.ti.com
IfRXn_AUTOREQ(wherenisthechannelnumber)ofAUTOREQregisterissetwithbinary11,INtokens
willbegeneratedandsenttothetargetUSBperipheraldeviceevenaftertheEndOfDMAPacketis
reached.ThisfeatureisusefultokeepdatareceptionoperationalacrossmultipleDMApacketsinaRx
queue.ThehostprocessordoesnothavetorestartsendingINtokensforeveryDMApacketintheRx
queue.
TransparentModeSetup
TransparentreceiveDMAconfigurationisidenticaltoRNDISDMAconfigurationwiththeexceptionofthe
following:
•EachpacketisdefinedbyasinglebufferdescriptorwithSOPandEOPbitfieldsset.
•Packetsizeisnotboundedtobeamultipleof64bytebutbymaxpacketsize.
•CTRLR.RNDISbitfieldshouldbeclearedtozero.
•RXn:AUTOREQregisterfieldisprogrammedwiththevalueof0,whichisprogrammedfornoAuto
Request.
InordertoTeardownaTXchannel,theendpointFIFOmustbeflushedaftertheDMATeardown
completes.Teardownisnotcompleteuntilthefollowingstepsaresuccessfullycompleted.
•WritetheTXTeardownregisterintheCPPIDMAwiththechanneltoteardown.TheDMAwillinterrupt
aftertheteardowniscompleteandtheTXCompletionPointerwillbeFFFFFFFCh.Thisindicatesthat
theDMAhascompletedtheteardownandalloftheassociatedCPPIbufferscanbereclaimed.
•Calltheflush_tx_fiforoutine(codeprovidedinExample4)onceiftheFIFOissetupforsingle-bufferor
twicefordouble-buffer.
Table14liststheinterruptsgeneratedbytheUSBcontroller.
Table14.InterruptsGeneratedbytheUSBController
InterruptDescription
TxEndpoint[4:0]Txendpointreadyorerrorcondition.Forendpoints4to0.(RxandTxforendpoint0)
RxEndpoint[4:1]Rxendpointreadyorerrorcondition.Forendpoints4to1.(Endpoint0hasinterruptstatusin
Txinterrupt)
USBCore[8:0]Interruptsfor9USBconditions
DMATxCompletion[3:0]TxDMAcompletioninterruptforchannel3to0
DMARxCompletion[3:0]RxDMAcompletioninterruptforchannel3to0
Wheneveranyoftheseinterruptconditionsaregenerated,thehostprocessorisinterrupted.Thesoftware
needstoreadthedifferentinterruptstatusregisters(discussedinlatersection)todeterminethesourceof
theinterrupt.
ThenineUSBinterruptconditionsarelistedinTable15.
Table15.USBInterruptConditions
InterruptDescription
USB[8]DRVVBUSlevelchange
USB[7]VBusvoltage<VBusValidThreshold(VBuserror)
USB[6]SRPdetected
USB[5]DeviceDisconnected(ValidinHostMode)
USB[4]DeviceConnected(ValidinHostMode)
68UniversalSerialBus(USB)ControllerSPRUGH3–November2008
SubmitDocumentationFeedback