Texas Instruments TMS320DM357 Switch User Manual


 
RXmode
RxPktRdy
set
?
Return
No
Yes
ReadCount0
register(n)
Unloadnbytes
fromFIFO
Last
packet
?
No
Yes
Set
ServicedRxPktRdy
Set
ServicedRxPktRdy
andDataEnd
state->IDLE
Return
www.ti.com
USBControllerHostandPeripheralModesOperation
3.1.1.5.3RXMode
InRXmode,allarrivingdatashouldbetreatedaspartofadataphaseuntiltheexpectedamountofdata
hasbeenreceived.IfeitheraSETUPoranINtokenisreceivedwhiletheendpointisinRXstate,a
SetupEndconditionwilloccurasthecontrollerexpectsonlyOUTtokens.
ThreeeventscancauseRXmodetobeterminatedbeforetheexpectedamountofdatahasbeen
receivedasshowninFigure8:
1.ThehostsendsaninvalidtokencausingaSETUPENDcondition(settingbit4ofPERI_CSR0).
2.Thehostsendsapacketwhichcontainslessthanthemaximumpacketsizeforendpoint0.
3.Thehostsendsanemptydatapacket.
Untilthetransactionisterminated,thesoftwareunloadstheFIFOwhenitreceivesaninterruptthat
indicatesnewdatahasarrived(settingRXPKTRDYbitofPERI_CSR0)andtoclearRXPKTRDYby
settingtheSERV_RXPKTRDYbitofPERI_CSR0(bit6).
Whenthesoftwaredetectstheterminationofatransfer(byreceivingeithertheexpectedamountofdata
oranemptydatapacket),itshouldsettheDATAENDbit(bit3ofPERI_CSR0)toindicatetothecontroller
thatthedataphaseiscompleteandthatthecoreshouldreceiveanacknowledgepacketnext.
Figure8.RXModeFlowChart
SPRUGH3November2008UniversalSerialBus(USB)Controller35
SubmitDocumentationFeedback