![](https://pdfstore-manualsonline.prod.a.ki/pdfasset/d/b7/db742270-ca8c-4749-a876-e49802fee529/db742270-ca8c-4749-a876-e49802fee529-bg17.png)
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.
SPRUEQ6–December2007EthernetMediaAccessController(EMAC)/ManagementDataInput/Output(MDIO)23
SubmitDocumentationFeedback