Texas Instruments TMS320DM357 Switch User Manual


 
www.ti.com
USBControllerHostandPeripheralModesOperation
3.1.4.2.1Setup
InconfiguringanRxendpointforIsochronousOUTtransactions,theRXMAXPregistermustbewritten
withthemaximumpacketsize(inbytes)fortheendpoint.Thisvalueshouldbethesameasthe
wMaxPacketSizefieldoftheStandardEndpointDescriptorfortheendpoint.Inaddition,therelevant
interruptenablebitintheINTRRXEregistershouldbeset(ifaninterruptisrequiredforthisendpoint)and
thePERI_RXCSRregistershouldbesetasshowninTable5.
Table5.PERI_RXCSRRegisterBitConfigurationforIsochronousOUTTransactions
BitPositionBitFieldNameConfiguration
Bit14ISOSetto1toenableisochronousprotocol
Bit13DMAENSetto1ifaDMArequestisrequiredforthisendpoint
Bit12DISNYETIgnoredinisochronoustransfers
Bit11DMAMODEAlwayssetthisbitto0
3.1.4.2.2Operation
AnIsochronousendpointdoesnotsupportdataretriesso,ifadataoverrunistobeavoided,theremust
bespaceintheFIFOtoacceptapacketwhenitisreceived.Thehostwillsendonepacketperframe(or
microframeinHigh-speedmode);however,thetimewithintheframecanvary.Ifapacketisreceivednear
theendofoneframe(/microframe)andanotherarrivesatthestartofthenextframe,therewillbelittletime
tounloadtheFIFO.Forthisreason,doublebufferingoftheendpointisusuallynecessary.
Aninterruptisgeneratedwheneverapacketisreceivedfromthehostandthesoftwaremayusethis
interrupttounloadthepacketfromtheFIFOandcleartheRXPKTRDYbitinthePERI_RXCSRregister
(bit0)inthesamewayasforaBulkRxendpoint.Astheinterruptcouldoccuralmostanytimewithina
frame(/microframe),dependingonwhenthehosthasscheduledthetransaction,thetimingofFIFOunload
requestswillprobablybeirregular.Ifthedatasinkfortheendpointisgoingtosomeexternalhardware,it
maybebettertominimizetherequirementforadditionalbufferingbywaitinguntiltheendofeach
frame(/microframe)beforeunloadingtheFIFO.ThiscanbedonebyusingeithertheSOFinterruptorthe
externalSOF_PULSEsignalfromthecontrollertotriggertheunloadingofthedatapacket.The
SOF_PULSEisgeneratedonceperframe(/microframe)whenaSOFpacketisreceived.(Thecontroller
alsomaintainsanexternalframe(/microframe)countersoitcanstillgenerateaSOF_PULSEwhenthe
SOFpackethasbeenlost.)TheinterruptsmaystillbeusedtocleartheRXPKTRDYbitinPERI_RXCSR
andtocheckfordataoverruns/underruns.
3.1.4.2.3ErrorHandling
IfthereisnospaceintheFIFOtostoreapacketwhenitisreceivedfromthehost,theOVERRUNbitin
thePERI_RXCSRregister(bit2)willbeset.Thisisanindicationthatthesoftwareisnotunloadingdata
fastenoughforthehost.Itisuptotheapplicationtodeterminehowthiserrorconditionishandled.
IfthecontrollerfindsthatareceivedpackethasaCRCerror,itwillstillstorethepacketintheFIFOand
settheRXPKTRDYbit(bit0ofPERI_RXCSR)andtheDATAERRORbit(bit3ofPERI_RXCSR).Itisleft
uptotheapplicationhowthiserrorconditionishandled.
SPRUGH3November2008UniversalSerialBus(USB)Controller43
SubmitDocumentationFeedback