小弟最近在用stm32f407做网络通信实验,由于需要做MAC地址过滤,我在Low_Level_Init 里面添加
hwaddr[0] = 0;
hwaddr[1] = 17;
hwaddr[2] = 17;
hwaddr[3] = 34;
hwaddr[4] = 51;
hwaddr[5] = 0xaa;
ETH_MACAddressConfig(ETH_MAC_Address1, hwaddr);
ETH_MACAddressFilterConfig(ETH_MAC_Address1,ETH_MAC_AddressFilter_SA);
ETH_MACAddressPerfectFilterCmd(ETH_MAC_Address1,ENABLE);
这段代码用来过滤源地址,这样我的stm32理论上来讲就应该只接收指定MAC地址发过来的报文,但是实际运行起来一点效果都没有。还请各位大神帮忙分析分析。
|