Debugging DHCP on RT1170

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Debugging DHCP on RT1170

ソリューションへジャンプ
577件の閲覧回数
vareddy_Amzn
Contributor II

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

タグ(3)
0 件の賞賛
返信
1 解決策
324件の閲覧回数
dereksnell
NXP Employee
NXP Employee

Hi @vareddy_Amzn ,

Yes, that is the commit for the latest release v4.2.0.  Thanks for checking it

元の投稿で解決策を見る

0 件の賞賛
返信
8 返答(返信)
248件の閲覧回数
dereksnell
NXP Employee
NXP Employee
0 件の賞賛
返信
222件の閲覧回数
vareddy_Amzn
Contributor II
Thanks for the reference!
Varun
0 件の賞賛
返信
325件の閲覧回数
dereksnell
NXP Employee
NXP Employee

Hi @vareddy_Amzn ,

Yes, that is the commit for the latest release v4.2.0.  Thanks for checking it

0 件の賞賛
返信
312件の閲覧回数
vareddy_Amzn
Contributor II
Hi Derek,
That did the trick. Thanks for the help!
Varun
0 件の賞賛
返信
332件の閲覧回数
dereksnell
NXP Employee
NXP Employee

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

0 件の賞賛
返信
327件の閲覧回数
vareddy_Amzn
Contributor II
Hi Derek,
Thanks for the detailed guide! I am using the EVKB and indeed connecting to J32. I will try upgrading to the latest v4.2 and get back to you with my results. Just to confirm, this is the release version of 4.2 (commit: https://github.com/zephyrproject-rtos/zephyr/commit/413b789deb391d3a37d06b463288a5fe765ee57e) ?
Thanks!
Varun
0 件の賞賛
返信
509件の閲覧回数
vareddy_Amzn
Contributor II

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

0 件の賞賛
返信
513件の閲覧回数
WWarne
NXP Employee
NXP Employee

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?  

WWarne_0-1755800823557.png

 

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

 

0 件の賞賛
返信