Texas Instruments TMS320C645x DSP Network Card User Manual


 
www.ti.com
2.6.3InterruptControl
2.7ManagementDataInput/Output(MDIO)Module
2.7.1MDIOModuleComponents
EMACFunctionalArchitecture
TheEMACcontrolmodulecombinesthemultipleinterruptconditionsgeneratedbytheEMACandMDIO
modulesintoasingleinterruptsignalthatismappedtoaCPUinterruptviatheCPUinterruptcontroller.
ThecontrolmoduleusestworegisterstocontroltheinterruptsignaltotheCPU.First,theINTENbitinthe
EWCTLregistergloballyenablesanddisablestheinterruptsignaltotheCPU.TheINTENbitdrivesthe
interruptlinelowduringinterruptprocessing.Uponre-enablingthebit,theinterruptsignalwillriseif
anotherinterruptconditionexists,creatingarisingedgedetectablebytheCPU.
TheEMACcontrolmoduleinterrupttimercountregister(EWINTTCNT)isprogrammedwithavaluethat
countsdownoncetheEMAC/MDIOinterruptsareenabledusingEWCTL.TheCPUinterruptsignalis
preventedfromrisingagainuntilthiscountreacheszero.
TheEWINTTCNThasnoeffectoninterruptsoncethecountreacheszero,sothereisnoinducedinterrupt
latencyonrandomsporadicinterrupts.However,thecountdelaystheissuingofasecondinterrupt
immediatelyafterafirst.Thisprotectsthesystemfromenteringinterruptthrashingmode,inwhichthe
softwareinterruptserviceroutine(ISR)completesprocessingjustintimetoreceiveanotherinterrupt.By
postponingsubsequentinterruptsinaback-to-backcondition,thesoftwareapplicationordrivercan
performmoreworkinitsISR.TheEWINTTCNTresetvaluecanbeadjustedfromwithintheISRaccording
tocurrentsystemload,orsettoafixedvaluethatassuresamaximumnumberofinterruptspersecond.
ThecountercountsattheperipheralclockfrequencyofCPUclock/6.Thedefaultresetcountis0
(inactive),themaximumvalueis1FFFFh(131071).
TheManagementDataInput/Output(MDIO)modulemanagesupto32physicallayer(PHY)devices
connectedtotheEthernetMediaAccessController(EMAC).TheMDIOmoduleallowsalmosttransparent
operationoftheMDIOinterfacewithlittlemaintenancefromtheCPU.
TheMDIOmoduleenumeratesallPHYdevicesinthesystembycontinuouslypolling32MDIOaddresses.
OnceitdetectsaPHYdevice,theMDIOmodulereadsthePHYstatusregistertomonitorthePHYlink
state.TheMDIOmodulestoreslinkchangeeventsthatcaninterrupttheCPU.Theeventstorageallows
theCPUtopollthelinkstatusofthePHYdevicewithoutcontinuouslyperformingMDIOmoduleaccesses.
However,whenthesystemmustaccesstheMDIOmoduleforconfigurationandnegotiation,theMDIO
moduleperformstheMDIOreadorwriteoperationindependentoftheCPU.Thisindependentoperation
allowstheDSPtopollforcompletionorinterrupttheCPUoncetheoperationhascompleted.
TheMDIOmodule(Figure12)interfacestoPHYcomponentsthroughtwoMDIOpins(MDCLKand
MDIO),andtotheDSPcorethroughtheEMACcontrolmoduleandtheconfigurationbus.TheMDIO
moduleconsistsofthefollowinglogicalcomponents:
MDIOclockgenerator
GlobalPHYdetectionandlinkstatemonitoring
ActivePHYmonitoring
PHYregisteruseraccess
38EthernetMediaAccessController(EMAC)/ManagementDataInput/Output(MDIO)SPRU975BAugust2006
SubmitDocumentationFeedback