This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
我在定制电路板上有一个 TM4C129ENCZAD、它不响应 ping 请求。 我正在微控制器上运行 enet_uIP 示例代码、并且仅将双工和速度更改为10M 半双工。
UpdateStatus("Using Internal PHY."); ui32PHYConfig = (EMAC_PHY_TYPE_INTERNAL | EMAC_PHY_INT_MDIX_EN | EMAC_PHY_FORCE_10B_T_HALF_DUPLEX);
我使用的是默认静态 IP 地址、
#define USE_STATIC_IP #ifndef DEFAULT_IPADDR0 #define DEFAULT_IPADDR0 169 #endif #ifndef DEFAULT_IPADDR1 #define DEFAULT_IPADDR1 254 #endif #ifndef DEFAULT_IPADDR2 #define DEFAULT_IPADDR2 19 #endif #ifndef DEFAULT_IPADDR3 #define DEFAULT_IPADDR3 63 #endif #ifndef DEFAULT_NETMASK0 #define DEFAULT_NETMASK0 255 #endif #ifndef DEFAULT_NETMASK1 #define DEFAULT_NETMASK1 255 #endif #ifndef DEFAULT_NETMASK2 #define DEFAULT_NETMASK2 0 #endif #ifndef DEFAULT_NETMASK3 #define DEFAULT_NETMASK3 0 #endif
我可以使用 UniFlash 将 MAC 地址编程到用户闪存中、并且可以使用网络交换机建立链路。 Ping 以"Destination host unreachable"(无法访问目标主机)进行响应。
C:\ti\uniflash_5.0.0\deskdb\content\TICloudAgent\win\ccs_base\common\uscif>ping 169.254.19.63 Pinging 169.254.19.63 with 32 bytes of data: Reply from 169.254.19.62: Destination host unreachable. Reply from 169.254.19.62: Destination host unreachable. Reply from 169.254.19.62: Destination host unreachable. Reply from 169.254.19.62: Destination host unreachable.
永远不会调用 PacketRecieve、并且在 ping 请求期间也不会调用以太网中断处理程序。 以太网中断处理程序在 tm4c129enczad_startup_ccs.c 中定义
您对为什么这不起作用有什么建议吗?
谢谢、
Allan
您好!
exmple enet_uIP 是否像使用 DHCP 一样工作?
如果您仅更改为静态地址但保持相同的 EMAC_PHY_AN_100B_T_FULL_DUPLEX、则示例 nnet_UIP 是否正常工作?
也许您可以在协议栈中启用 ICMP 回应,因为 ping 使用 IP 地址来定位端点目标。 据我所知、UIP 不直接支持 ICMP ping。
查尔斯
使用 DHCP 尝试示例似乎工作方式不同。 未获取 IP 地址、但正在发送数据包、
Using Internal PHY. Waiting for MAC to be ready... MAC ready. Waiting for Link. Link Established. Waiting for IP address... uip ip_send_nolen: checksum 0xffff Sending packet with length 277 (277) uip ip_send_nolen: checksum 0xffff Sending packet with length 277 (277) uip ip_send_nolen: checksum 0xffff Sending packet with length 277 (277) uip ip_send_nolen: checksum 0xffff Sending packet with length 277 (277)
使用 EMAC_PHY_AN_100B_T_FULL_DUPLEX 将静态 IP 设置为169.254.19.63时、永远不会建立链路、
[2J[HEthernet with uIP ----------------- Using Internal PHY. Waiting for MAC to be ready... MAC ready. Waiting for Link.
使用 静态 IP 将 EMAC_PHY_AN_100B_T_FULL_DUPLEX 更改为 EMAC_PHY_FORCE_10B_T_HALF_DUPLEX 会建立 链路、但不会发送数据包。
[2J[HEthernet with uIP ----------------- Using Internal PHY. Waiting for MAC to be ready... MAC ready. Waiting for Link. Link Established. IP: 169.254.19.63
您好!
很抱歉、我目前不在办公室、将于2022年4月1日回来。