Texas Instruments TMS320DM357 Switch User Manual


 
3.1USBControllerPeripheralModeOperation
3.1.1PeripheralMode:ControlTransactions
USBControllerHostandPeripheralModesOperation
www.ti.com
Softconnect-Afterareset,theSOFTCONNbitofPOWERregister(bit6)isclearedto0.The
controllerwillthereforeappeardisconnecteduntilthesoftwarehassettheSOFTCONNbitto1.The
applicationsoftwarecanthenchoosewhentosetthePHYintoitsnormalmode.Systemswitha
lengthyinitializationproceduremayusethistoensurethatinitializationiscompleteandthesystemis
readytoperformenumerationbeforeconnectingtotheUSB.
OncetheSOFTCONNbithasbeenset,thesoftwarecanalsosimulateadisconnectbyclearingthisbit
to0.
Entryintosuspendmode
Whenoperatingasaperipheraldevice,thecontrollermonitorsactivityonthebusandwhennoactivity
hasoccurredfor3ms,itgoesintoSuspendmode.IftheSuspendinterrupthasbeenenabled,an
interruptwillbegeneratedatthistime.
Atthispoint,thecontrollercanthenbeleftactive(andhenceabletodetectwhenResumesignaling
occursontheUSB),ortheapplicationmayarrangetodisablethecontrollerbystoppingitsclock.
However,thecontrollerwillnotthenbeabletodetectResumesignalingontheUSB.Asaresult,some
externalhardwarewillbeneededtodetectResumesignaling(bymonitoringtheDMandDPsignals),
sothattheclocktothecontrollercanberestarted.
ResumeSignaling-Whenresumesignalingoccursonthebus,firsttheclocktothecontrollermustbe
restartedifnecessary.ThenthecontrollerwillautomaticallyexitSuspendmode.IftheResume
interruptisenabled,aninterruptwillbegenerated.
Initiatingaremotewakeup-Ifthesoftwarewantstoinitiatearemotewakeupwhilethecontrollerisin
Suspendmode,itshouldwritetothePowerregistertosettheRESUMEbitto1.Thesoftwareshould
leavethenthisbitsetforapproximately10ms(minimumof2ms,amaximumof15ms)before
resettingitto0.
Note:Noresumeinterruptwillbegeneratedwhenthesoftwareinitiatesaremotewakeup.
ResetSignaling-Whenresetsignalingoccursonthebus,thecontrollerwillperformthefollowing
actions:
SetsFADDRregisterto0
SetsINDEXregisterto0
FlushesallendpointFIFOs
Clearsallcontrol/statusregisters
Generatesaresetinterrupt.
IftheHSENAbitinthePOWERregister(bit5)wasset,thecontrolleralsotriestonegotiatefor
high-speedoperation.
Whetherhigh-speedoperationisselectedisindicatedbyHSMODEbitofPOWERregister(bit4).
Whentheapplicationsoftwarereceivesaresetinterrupt,itshouldcloseanyopenpipesandwaitfor
busenumerationtobegin.
Endpoint0isthemaincontrolendpointofthecore.Thesoftwareisrequiredtohandleallthestandard
devicerequeststhatmaybesentorreceivedviaendpoint0.ThesearedescribedinUniversalSerialBus
Specification,Revision2.0,Chapter9.Theprotocolforthesedevicerequestsinvolvesdifferentnumbers
andtypesoftransactionspertransfer.Toaccommodatethis,thesoftwareneedstotakeastatemachine
approachtocommanddecodingandhandling.
TheStandardDeviceRequestsreceivedbyaUSBperipheraldevicecanbedividedintothreecategories:
ZeroDataRequests(inwhichalltheinformationisincludedinthecommand),WriteRequests(inwhich
thecommandwillbefollowedbyadditionaldata),andReadRequests(inwhichthedeviceisrequiredto
senddatabacktothehost).
Thissectionlooksatthesequenceofactionsthatthesoftwaremustperformtoprocessthesedifferent
typesofdevicerequest.
26UniversalSerialBus(USB)ControllerSPRUGH3November2008
SubmitDocumentationFeedback