Texas Instruments TMS320DM357 Switch User Manual


 
3.2USBControllerHostModeOperation
3.2.1HostMode:ControlTransactions
USBControllerHostandPeripheralModesOperation
www.ti.com
EntryintoSuspendmode.Whenoperatingasahost,thecontrollercanbepromptedtoenterSuspend
modebysettingtheSUSPENDMbitinthePOWERregister.Whenthisbitisset,thecontrollerwill
completethecurrenttransactionthenstopthetransactionschedulerandframecounter.Nofurther
transactionswillbestartedandnoSOFpacketswillbegenerated.IftheENSUSPMbit(bit0of
POWERregister)isset,PHYwillgointolow-powermodewhenthecontrollerentersSuspendmode.
SendingResumeSignaling.WhentheapplicationrequiresthecontrollertoleaveSuspendmode,it
mustcleartheSUSPENDMbitinthePOWERregister(bit1),settheRESUMEbit(bit2)andleaveit
setfor20ms.WhiletheRESUMEbitishigh,thecontrollerwillgenerateResumesignalingonthebus.
After20ms,theapplicationshouldcleartheResumebit,atwhichpointtheframecounterand
transactionschedulerwillbestarted.
RespondingtoRemoteWake-up.IfResumesignalingisdetectedfromthetargetwhilethecontrolleris
inSuspendmode,thePHYwillbebroughtoutoflow-powermode.Thecontrollerwillthenexit
SuspendmodeandautomaticallysettheRESUMEbitinthePOWERregister(bit2)totakeover
generatingtheResumesignalingfromthetarget.IftheResumeinterruptisenabled,aninterruptwill
begenerated.
ResetSignaling.IftheRESETbitinthePOWERregister(bit3)issetwhilethecontrollerisinHost
mode,itwillgenerateResetsignalingonthebus.IftheHSENABbitinthePOWERregister(bit5)was
set,itwillalsotrytonegotiateforhigh-speedoperation.ThesoftwareshouldkeeptheRESETbitset
foratleast20mstoensurecorrectresettingofthetargetdevice.Afterthesoftwarehasclearedthebit,
thecontrollerwillstartitsframecounterandtransactionscheduler.Whetherhigh-speedoperationis
selectedwillbeindicatedbyHSMODEbitofPOWERregister(bit4).
HostControlTransactionsareconductedthroughEndpoint0andthesoftwareisrequiredtohandleallthe
StandardDeviceRequeststhatmaybesentorreceivedviaEndpoint0(asdescribedinUniversalSerial
BusSpecification,Revision2.0,Chapter9).
AsforaUSBperipheraldevice,therearethreecategoriesofStandardDeviceRequeststobehandled:
ZeroDataRequests(inwhichalltheinformationisincludedinthecommand),WriteRequests(inwhich
thecommandwillbefollowedbyadditionaldata),andReadRequests(inwhichthedeviceisrequiredto
senddatabacktothehost).
1.ZeroDataRequestsconsistofaSETUPcommandfollowedbyanINStatusPhase
2.WriteRequestsconsistofaSETUPcommand,followedbyanOUTDataPhasewhichisinturn
followedbyanINStatusPhase
3.ReadRequestsconsistofaSETUPcommand,followedbyanINDataPhasewhichisinturnfollowed
byanOUTStatusPhase
Atimeoutmaybesettolimitthelengthoftimeforwhichthecontrollerwillretryatransactionwhichis
continuallyNAKedbythetarget.Thislimitcanbebetween2and215frames/microframesandisset
throughtheHOST_NAKLIMIT0register.ThefollowingsectionsdescribetheCPUactionsrequiredfor
thesedifferenttypesofrequestsbyexaminingthestepstotakeinthedifferentControlTransaction
phases.
UniversalSerialBus(USB)Controller 44SPRUGH3November2008
SubmitDocumentationFeedback