www.ti.com
2.10PacketReceiveOperation
2.10.1ReceiveDMAHostConfiguration
2.10.2ReceiveChannelEnabling
2.10.3ReceiveAddressMatching
PeripheralArchitecture
ToconfigurethereceiveDMAforoperationthehostmust:
•Initializethereceiveaddresses.
•InitializethereceivechannelnDMAheaddescriptorpointerregisters(RXnHDP)to0.
•WritetheMACaddresshashnregisters(MACHASH1andMACHASH2),ifmulticastaddressingis
desired.
•Ifflowcontrolistobeenabled,initialize:
–thereceivechannelnfreebuffercountregisters(RXnFREEBUFFER)
–thereceivechannelnflowcontrolthresholdregister(RXnFLOWTHRESH)
–thereceivefilterlowpriorityframethresholdregister(RXFILTERLOWTHRESH)
•Enablethedesiredreceiveinterruptsusingthereceiveinterruptmasksetregister(RXINTMASKSET)
andthereceiveinterruptmaskclearregister(RXINTMASKCLEAR).
•SettheappropriateconfigurationbitsintheMACcontrolregister(MACCONTROL).
•Writethereceivebufferoffsetregister(RXBUFFEROFFSET)value(typicallyzero).
•Setupthereceivechannel(s)bufferdescriptorsandinitializeRXnHDP.
•EnablethereceiveDMAcontrollerbysettingtheRXENbitinthereceivecontrolregister
(RXCONTROL).
•Configureandenablethereceiveoperation,asdesired,inthereceive
multicast/broadcast/promiscuouschannelenableregister(RXMBPENABLE)andbyusingthereceive
unicastsetregister(RXUNICASTSET)andthereceiveunicastclearregister(RXUNICASTCLEAR).
Eachoftheeightreceivechannelshasanenablebit(RXCHnEN)inthereceiveunicastsetregister
(RXUNICASTSET)thatiscontrolledusingRXUNICASTSETandthereceiveunicastclearregister
(RXUNICASTCLEAR).TheRXCHnENbitsdeterminewhetherthegivenchannelisenabled(whensetto
1)toreceiveframeswithamatchingunicastormulticastdestinationaddress.
TheRXBROADENbitinthereceivemulticast/broadcast/promiscuouschannelenableregister
(RXMBPENABLE)determinesifbroadcastframesareenabledorfiltered.Ifbroadcastframesareenabled
(whensetto1),thentheyarecopiedtoonlyasinglechannelselectedbytheRXBROADCHbitin
RXMBPENABLE.
TheRXMULTENbitinRXMBPENABLEdeterminesifhashmatchingmulticastframesareenabledor
filtered.Incomingmulticastaddresses(groupaddresses)arehashedintoanindexinthehashtable.Ifthe
indexedbitissetthentheframehashmatchesandwillbetransferredtothechannelselectedbythe
RXMULTCHbitinRXMBPENABLEwhenmulticastframesareenabled.Themulticasthashbitsaresetin
theMACaddresshashnregisters(MACHASH1andMACHASH2).
TheRXPROMCHbitinRXMBPENABLEselectsthepromiscuouschanneltoreceiveframesselectedby
theRXCMFEN,RXCSFEN,RXCEFEN,andRXCAFENbits.ThesefourbitsallowreceptionofMAC
controlframes,shortframes,errorframes,andallframes(promiscuous),respectively.
AlleightMACaddressescorrespondingtotheeightreceivechannelssharetheupper40bits.Onlythe
lowerbyteisuniqueforeachaddress.Alleightreceiveaddressesshouldbeinitialized,becausepause
framesareacteduponregardlessofwhetherachannelisenabledornot.
AMACaddressiswrittenbyfirstwritingtheaddressnumber(channel)tobewrittenintotheMACindex
register(MACINDEX).Theupper32bitsofaddressarethenwrittentotheMACaddresshighbytes
register(MACADDRHI),whichisfollowedbywritingthelower16bitsofaddresstotheMACaddresslow
bytesregister(MACADDRLO).SincealleightMACaddressessharetheupper40bitsofaddress,
MACADDRHIneedstobewrittenonlythefirsttime(forthefirstchannelconfigured).
SPRU941A–April2007EthernetMediaAccessController(EMAC)/39
ManagementDataInput/Output(MDIO)
SubmitDocumentationFeedback