Hi,
I am trying to setup a TCP server on the RT1170 CM7 core using the EVK. With my test code I see that the interface is coming up, but DHCP is not assigning an IP to it. I even tried the DHCPv4 sample from the samples/net/ directory but it also does not get an IP. How would I go about debugging this? I don't see any DHCP specific logs once the device starts up.
I added some extra logging to check the DHCP state and it just gets stuck in state 1 (NET_DHCPV4_INIT)
[00:00:00.051,000] <inf> phy_mii: PHY (0) ID 1CC816
[00:00:00.053,000] <err> eth_nxp_enet_mac: phy_configure_link failed with error: -120
[00:00:00.054,000] <inf> eth_nxp_enet_mac: Link is down
[00:00:00.054,000] <err> eth_nxp_enet_mac: phy_configure_link failed with error: -120
*** Booting Zephyr OS build v4.2.0-rc1-129-gfdd02c5105d2 ***
[00:00:00.055,000] <inf> net_dhcpv4_client_sample: Run dhcpv4 client
[00:00:00.055,000] <inf> net_dhcpv4_client_sample: Start on ethernet: index=1
DHCP state: 1
[00:00:03.156,000] <inf> phy_mii: PHY (0) Link speed 100 Mb, full duplex
[00:00:03.156,000] <inf> eth_nxp_enet_mac: Link is up
DHCP state: 1
Any pointers would be appreciated.
Thanks!
Varun
解決済! 解決策の投稿を見る。
@vareddy_Amzn , FYI
Here is an article Zephyr networking stack on i.MX RT1170 Cortex-M4 secondary core
Best regards
Hi @vareddy_Amzn and @WWarne ,
First, can you confirm the board part number revision you are using? There are two revisions, and they use different 10/100M Ethernet PHYs. The Zephyr default is the latest MIMXRT1170-EVKB. The older part number was MIMXRT1170-EVK, which Zephyr calls Rev A. Also, I assume you are using the 10/100M Ethernet connection for this, which is J32 on EVKB (or J3 on EVK(A)).
Your log shows you are not using the latest Zephyr release, but using an older commit fdd02c5105d2. I tested the dhcpv4_client sample with that commit, and I also see issues on the EVKB revision, and the board never gets an IP address:
[00:00:00.051,000] <inf> phy_mii: PHY (0) ID 1CC816
[00:00:00.053,000] <err> eth_nxp_enet_mac: phy_configure_link failed with error0
[00:00:00.054,000] <inf> eth_nxp_enet_mac: Link is down
[00:00:00.054,000] <err> eth_nxp_enet_mac: phy_configure_link failed with error0
*** Booting Zephyr OS build v4.2.0-rc1-129-gfdd02c5105d2 ***
[00:00:00.055,000] <inf> net_dhcpv4_client_sample: Run dhcpv4 client
[00:00:00.055,000] <inf> net_dhcpv4_client_sample: Start on ethernet: index=1
[00:00:03.155,000] <inf> phy_mii: PHY (0) Link speed 100 Mb, full duplex
[00:00:03.155,000] <inf> eth_nxp_enet_mac: Link is up
But using the latest upstream Zephyr release v4.2 resolves that issue for me:
[00:00:00.051,000] <inf> phy_mii: PHY (0) ID 1CC816
[00:00:00.054,000] <inf> eth_nxp_enet_mac: Link is down
*** Booting Zephyr OS build v4.2.0 ***
[00:00:00.055,000] <inf> net_dhcpv4_client_sample: Run dhcpv4 client
[00:00:00.055,000] <inf> net_dhcpv4_client_sample: Start on ethernet: index=1
[00:00:03.155,000] <inf> phy_mii: PHY (0) Link speed 100 Mb, full duplex
[00:00:03.155,000] <inf> eth_nxp_enet_mac: Link is up
[00:00:06.423,000] <inf> net_dhcpv4: Received: 192.168.86.165
[00:00:06.423,000] <inf> net_dhcpv4_client_sample: Address[1]: 192.168.86.165
[00:00:06.423,000] <inf> net_dhcpv4_client_sample: Subnet[1]: 255.255.255.0
[00:00:06.423,000] <inf> net_dhcpv4_client_sample: Router[1]: 192.168.86.1
[00:00:06.423,000] <inf> net_dhcpv4_client_sample: Lease time[1]: 86400 seconds
Can you please try updating to v4.2 and see if that resolves your issue? Thank you
Hi WWarne,
I'm not using MCUXpresso, I'm using the Zephyr build system and the example that I was referring to is the DHCPv4 sample application: https://github.com/zephyrproject-rtos/zephyr/tree/main/samples/net/dhcpv4_client
Thanks!
Varun
Hi Varun-
It sounds like you are using the RT1170 and running into the same issue using the SDK example. What SDK example did you choose that shows the same error?
Above is a list of the options for RT1170.
Are you using MCUXPresso Eclipse based or VSCode? What version of SDK are you using?
Thank you