在使用ZYNQ MPSOC的模块AN706时候出现了如题目所示的问题,具体的是:
黑金例程中给出正常应该给出传输速率1000,然后给出开发板IP地址,具体如下:
查找了博客:https://blog.youkuaiyun.com/qq_39597489/article/details/107020923
修改后并没有用。看了这篇博客评论区,有大佬给出了解决方法:
于是插了开发板的用户手册,网口芯片使用的是KSZ9031RNX,然后找了这个网口的驱动资料,找到了下面这篇博客:https://blog.youkuaiyun.com/xinhh/article/details/140554494。
按照这篇博客解决了问题。
找到
.\32_ad7606_lwip\vitis\design_1_wrapper\psu_cortexa53_0\standalone_domain\bsp\psu_cortexa53_0\libsrc\lwip211_v1_3\src\contrib\ports\xilinx\netif\xemacpsif_physpeed.c
加入上述博客中的程序:
static u32_t get_IEEE_phy_speed(XEmacPs *xemacpsp, u32_t phy_addr)
{
u16_t phy_identity;
u32_t RetStatus;
XEmacPs_PhyRead(xemacpsp, phy_addr, PHY_IDENTIFIER_1_REG,
&phy_identity);
if (phy_identity == PHY_TI_IDENTIFIER) {
RetStatus = get_TI_phy_speed(xemacpsp, phy_addr);
} else if (phy_identity == PHY_REALTEK_IDENTIFIER) {
RetStatus = get_Realtek_phy_speed(xemacpsp, phy_addr);
} else if(phy_identity == MICREL_PHY_IDENTIFIER){
RetStatus = get_phy_speed_ksz9031(xemacpsp, phy_addr);
} else {
RetStatus = get_Marvell_phy_speed(xemacpsp, phy_addr);
}
return RetStatus;
}
注意把函数get_phy_speed_ksz9031放到函数get_IEEE_phy_speed前面。
运行,问题解决
教程建议结合米联客的一起学习,同样的ADC模块米联客叫DAQ001。
2025.06.14 再次更新一下
在编译工程的时候又出现了网口找不到的问题,这次串口助手反复的打印
Ethernet Link up
Ethernet Link down
猜测应该还是之前的问题,然后去找那个文件,发现确实是没有修改,改了一顿,还是不对。最后发现是改错了文件,在xemacpsif_physpeed.c相同的目录下还有一个xamacpsif_physpeed.c,我对这xamacpsif_physpeed.c一顿修改,自然是没用的。
至于说为什么我之前修改过了xemacpsif_physpeed.c文件,但是现在又要修改xemacpsif_physpeed.c文件,是因为我修改了板级支持包,然后BSP又重新生成了。
附上一些关于这个问题的链接
https://www.cnblogs.com/protogenoi/p/9779405.html
https://www.corecourse.cn/forum.php?mod=viewthread&tid=29166
https://www.corecourse.cn/forum.php?mod=viewthread&tid=29789
https://blog.youkuaiyun.com/weixin_45827703/article/details/147947507
https://blog.youkuaiyun.com/aatu/article/details/135281527