Hi, I am starting to develop a network application using my own code because the Inter Niche stack is too big for my requirements.
After setting the PHY and FEC modules, I receive Ethernet frames, but only multicast (1st byte of MAC Address = 01) or broadcast (FF:FF:FF:FF:FF:FF) frames. I am not able to make a FEC interrupt with unicast frames addressed to my eval board. Neither using the promiscuous mode asserted. I think the unicast frames are being rejected, but I don’t see the reason. Following you can see some of my registers configuration.
MCF_FEC_RCR = MCF_FEC_RCR_MAX_FL(0x3E8) |
MCF_FEC_RCR_MII_MODE |
MCF_FEC_RCR_PROM |
MCF_FEC_RCR_DRT;
MCF_FEC_TCR = 0;
MCF_FEC_EIMR = MCF_FEC_EIMR_TXF |
MCF_FEC_EIMR_RXF ;
MCF_FEC_FRSR = 0x00000500;
MCF_FEC_TFWR = MCF_FEC_TFWR_X_WMRK(0x2);
unsigned char mac_addr_fec[8] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
/* Program this station's Ethernet physical address */
/* Set the source address for the controller */
MCF_FEC_PALR = (uint32)((0
| (mac_addr_fec[0] <<24)
| (mac_addr_fec[1] <<16)
| (mac_addr_fec[2] <<8)
| (mac_addr_fec[3] <<0)));
MCF_FEC_PAUR = (uint32)((0
| (mac_addr_fec[4] <<24)
| (mac_addr_fec[5] <<16)
| MCF_FEC_PAUR_TYPE(0x00008808)));
/* Configure Ethernet hash table bits */
MCF_FEC_GAUR = 0;
MCF_FEC_GALR = 0;
MCF_FEC_IAUR = 0;
MCF_FEC_IALR = 0;
Thanks for your help in advanced
解決済! 解決策の投稿を見る。
mellow wrote:
unsigned char mac_addr_fec[8] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
This is not a legal mac address.
If you are going to just make one up, be careful about the first octet.
mellow wrote:
unsigned char mac_addr_fec[8] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
This is not a legal mac address.
If you are going to just make one up, be careful about the first octet.
mellow wrote:
At first I was using this MAC address from an old Ethernet card 00:16:E6:1A:44:80, which is not detected by the receive block. However now I have tested the MAC address used in the InterNiche Stack (00:cf:52:08:cf:01) and it is received correctly. Does it mean that not all MAC address are detected right by the receive block?
Which is the first octet? I think is the one starting on the left, isn’t?
More useful information is here: http://en.wikipedia.org/wiki/MAC_address
If the first octet is odd, the coldfire hardware handles it as multicast and it cannot be used as a unicast address. If the MAC address is all zero, some implementations of the ARP protocol will be confused because they use all zeros as an internal indicator that the MAC is unknown.
I don't see any obvious problem with 00:16:E6:1A:44:80, although some company probably owns the 00:16:E6 prefix (likewise the 00:cf:52 prefix).
Vendors should advise implementors to set the "locally administered" bit when they need to create their own MAC addresses (for example start with 02.
Hi
mac_addr_fec[0] is the first octet.
There should be no problems with using 00-00-00-00-00-00 as MAC address. The only time that it may cause difficulties is when using it together with DHCP where the DHCP server may not grant an IP address (many do though).
See also following threads:
Regards
Mark
www.uTasker.com
- OS, TCP/IP stack, USB, device drivers and simulator for M521X, M521XX, M5221X, M5222X, M5223X, M5225X. One package does them all - "Embedding it better..."