A SERVICE OF

logo

www.ti.com
2.5.3TransmitandReceiveEMACInterrupts
Architecture
TheEMACprocessesdescriptorsinlinkedlistchainsasdiscussedinSection2.5.1,usingthelinkedlist
queuemechanismdiscussedinSection2.5.2.
TheEMACsynchronizesdescriptorlistprocessingthroughtheuseofinterruptstothesoftware
application.Theinterruptsarecontrolledbytheapplicationusingtheinterruptmasks,globalinterrupt
enable,andthecompletionpointerregister(CP).TheCPisalsocalledtheinterruptacknowledgeregister.
AstheEMACsupportseightchannelsforbothtransmitandreceive,thereareeightcompletionpointer
registersforboth.Theyare:
TXnCP-TransmitChannelnCompletionPointer(InterruptAcknowledge)Register
RXnCP-ReceiveChannelnCompletionPointer(InterruptAcknowledge)Register
Theseregistersservetwopurposes.Whenread,theyreturnthepointertothelastdescriptorthatthe
EMAChasprocessed.Whenwrittenbythesoftwareapplication,thevaluerepresentsthelastdescriptor
processedbythesoftwareapplication.Whenthesetwovaluesdonotmatch,theinterruptremains
asserted,aftertherespectiveEndofinterruptbitissignaledintheEMACcontrolmodule.
ThesystemconfigurationdetermineswhetherornotanactiveinterruptactuallyinterruptstheCPU.In
general,theindividualinterruptsfordifferenteventsfromtheEMACandMDIOmustbeenabledinthe
EMACcontrolmodule,anditalsomustbemappedintheARMinterruptcontrollerandenabledasaCPU
interrupt.Ifthesystemisconfiguredproperly,theinterruptforaspecificreceiveortransmitchannel
executesunderthepreviouslydescribedconditionswhenthecorrespondinginterruptisenabledinthe
EMACusingthereceiveinterruptmasksetregister(RXINTMASKSET)orthetransmitinterruptmaskset
register(TXINTMASKSET).
Whetherornottheinterruptisenabled,thecurrentstateofthereceiveortransmitchannelinterruptcan
beexamineddirectlybythesoftwareapplicationreadingthereceiveinterruptstatus(unmasked)register
(RXINTSTATRAW)andtransmitinterruptstatus(unmasked)register(TXINTSTATRAW).
InterruptsareacknowledgedwhentheapplicationsoftwareupdatesthevalueofTXnCPorRXnCPwitha
valuethatmatchestheinternalvaluekeptbytheEMAC.Thismechanismensuresthattheapplication
softwarenevermissesanEMACinterrupt,sincetheinterruptanditsacknowledgmentaretieddirectlyto
theactualbufferdescriptorsprocessing.
SPRUEQ6December2007EthernetMediaAccessController(EMAC)/ManagementDataInput/Output(MDIO)23
SubmitDocumentationFeedback