Texas Instruments TMS320DM643x DMP Switch User Manual


 
www.ti.com
2.7.2MDIOModuleOperationalOverview
PeripheralArchitecture
TheMDIOmoduleimplementsthe802.3serialmanagementinterfacetointerrogateandcontrolan
EthernetPHY,usingasharedtwo-wiredbus.Itseparatelyperformsautodetectionandrecordsthecurrent
linkstatusofupto32PHYs,pollingall32MDIOaddresses.
ApplicationsoftwareusestheMDIOmoduletoconfiguretheautonegotiationparametersofthePHY
attachedtotheEMAC,retrievethenegotiationresults,andconfigurerequiredparametersintheEMAC.
Inthisdevice,theEthernetPHYattachedtothesystemcanbedirectlycontrolledandqueried.TheMedia
IndependentInterface(MII)addressofthisPHYdeviceisspecifiedinoneofthePHYADRMONbitsinthe
MDIOuserPHYselectregister(USERPHYSELn).TheMDIOmodulecanbeprogrammedtotriggera
CPUinterruptonaPHYlinkchangeevent,bysettingtheLINKINTENBbitinUSERPHYSELn.Readsand
writestoregistersinthisPHYdeviceareperformedusingtheMDIOuseraccessregister
(USERACCESSn).
TheMDIOmodulepowers-upinanidlestateuntilspecificallyenabledbysettingtheENABLEbitinthe
MDIOcontrolregister(CONTROL).Atthistime,theMDIOclockdividerandpreamblemodeselectionare
alsoconfigured.TheMDIOpreambleisenabledbydefault,butcanbedisabledwhentheconnectedPHY
doesnotrequireit.OncetheMDIOmoduleisenabled,theMDIOinterfacestatemachinecontinuously
pollsthePHYlinkstatus(byreadingthegenericstatusregister)ofallpossible32PHYaddressesand
recordstheresultsintheMDIOPHYalivestatusregister(ALIVE)andMDIOPHYlinkstatusregister
(LINK).ThecorrespondingbitfortheconnectedPHY(0-31)issetinALIVE,ifthePHYrespondedtothe
readrequest.ThecorrespondingbitissetinLINK,ifthePHYrespondedandalsoiscurrentlylinked.In
addition,anyPHYregisterreadtransactionsinitiatedbytheapplicationsoftwareusingUSERACCESSn
causesALIVEtobeupdated.
TheUSERPHYSELnisusedtotrackthelinkstatusoftheconnectedPHYaddress.Achangeinthelink
statusofthePHYbeingmonitoredsetstheappropriatebitintheMDIOlinkstatuschangeinterrupt
registers(LINKINTRAWandLINKINTMASKED),ifenabledbytheLINKINTENBbitinUSERPHYSELn.
WhiletheMDIOmoduleisenabled,thehostissuesareadorwritetransactionovertheMIImanagement
interfaceusingtheDATA,PHYADR,REGADR,andWRITEbitsinUSERACCESSn.Whentheapplication
setstheGObitinUSERACCESSn,theMDIOmodulebeginsthetransactionwithoutanyfurther
interventionfromtheCPU.Uponcompletion,theMDIOmoduleclearstheGObitandsetsthe
correspondingUSERINTRAWbit(0or1)intheMDIOusercommandcompleteinterruptregister
(USERINTRAW)correspondingtoUSERACCESSnused.ThecorrespondingUSERINTMASKEDbit(0or
1)intheMDIOusercommandcompleteinterruptregister(USERINTMASKED)mayalsobeset,
dependingonthemasksettingconfiguredintheMDIOusercommandcompleteinterruptmaskset
register(USERINTMASKSET)andtheMDIOuserinterruptmaskclearregister(USERINTMASKCLEAR).
Around-robinarbitrationschemeisusedtoscheduletransactionsthatmaybequeuedusingboth
USERACCESS0andUSERACCESS1.TheapplicationsoftwaremustcheckthestatusoftheGObitin
USERACCESSnbeforeinitiatinganewtransaction,toensurethattheprevioustransactionhas
completed.TheapplicationsoftwarecanusetheACKbitinUSERACCESSntodeterminethestatusofa
readtransaction.
EthernetMediaAccessController(EMAC)/ 30SPRU941AApril2007
ManagementDataInput/Output(MDIO)
SubmitDocumentationFeedback