Texas Instruments TMS320DM643x DMP Switch User Manual


 
www.ti.com
2.16.1.3StatisticsInterrupt
2.16.1.4HostErrorInterrupt
PeripheralArchitecture
Uponinterruptreception,theCPUprocessesoneormorepacketsfromthebufferchainandthen
acknowledgesoneormoreinterrupt(s)bywritingtheaddressofthelastbufferdescriptorprocessedto
thequeue'sassociatedreceivecompletionpointerinthereceiveDMAstateRAM.
Thedatawrittenbythehost(bufferdescriptoraddressofthelastprocessedbuffer)iscomparedtothe
dataintheregisterwrittenbytheEMAC(addressoflastbufferdescriptorusedbytheEMAC).Ifthe
twovaluesarenotequal(whichmeansthattheEMAChasreceivedmorepacketsthantheCPUhas
processedinterruptsfor),thereceivepacketcompletioninterruptsignalremainsasserted.Ifthetwo
valuesareequal(whichmeansthatthehosthasprocessedallpacketsthattheEMAChasreceived),
thependinginterruptisde-asserted.ThevaluethattheEMACisexpectingisfoundbyreadingthe
receivechannelncompletionpointerregister(RXnCP).
TheEMACwritetothecompletionpointeractuallystoresthevalueinthestateRAM.TheCPUwritten
valuedoesnotactuallychangetheregistervalue.Thehostwrittenvalueiscomparedtotheregister
content(whichwaswrittenbytheEMAC)andifthetwovaluesareequalthentheinterruptisremoved;
otherwise,theinterruptremainsasserted.Thehostmayprocessmultiplepacketspriorto
acknowledginganinterrupt,orthehostmayacknowledgeinterruptsforeverypacket.
Thestatisticslevelinterrupt(STATPEND)isissuedwhenanystatisticsvalueisgreaterthanorequalto
80000000h,ifenabledbysettingtheSTATMASKbitintheMACinterruptmasksetregister
(MACINTMASKSET)to1.Thestatisticsinterruptisremovedbywritingtodecrementanystatistics
valuegreaterthan80000000h.Aslongasthemost-significantbitofanystatisticsvalueisset,the
interruptremainsasserted.
Thehosterrorinterrupt(HOSTPEND)isissued,ifenabled,undererrorconditionsdealingwiththe
handlingofbufferdescriptors,detectedduringtransmitorreceiveDMAtransactions.Thefailureofthe
softwareapplicationtosupplyproperlyformattedbufferdescriptorsresultsinthiserror.Theerrorbit
canonlybeclearedbyresettingtheEMACmoduleinhardware.
ThehosterrorinterruptisenabledbysettingtheHOSTMASKbitintheMACinterruptmasksetregister
(MACINTMASKSET)to1.ThehosterrorinterruptisdisabledbyclearingtheappropriatebitintheMAC
interruptmaskclearregister(MACINTMASKCLEAR)to0.Therawandmaskedhosterrorinterrupt
statusmaybereadbyreadingtheMACinterruptstatus(unmasked)register(MACINTSTATRAW)and
theMACinterruptstatus(masked)register(MACINTSTATMASKED),respectively.
Thetransmithosterrorconditionsare:
SOPerror
OwnershipbitnotsetinSOPbuffer
ZeronextbufferdescriptorpointerwithEOP
Zerobufferpointer
Zerobufferlength
Packetlengtherror
Thereceivehosterrorconditionsare:
Ownershipbitnotsetininputbuffer
Zerobufferpointer
50EthernetMediaAccessController(EMAC)/SPRU941AApril2007
ManagementDataInput/Output(MDIO)
SubmitDocumentationFeedback