FRDM-MCXN947 Ethernet port set up - PHY LAN8741A I am struggling to get the ethernet port to connect. On debug, I keep getting the following below on frdm board. [00:00:00.000,000] phy_mii: PHY (0) ID 7C121 [00:00:00.006,000] phy_mii: phy_mii_[00:00:00.000,000] phy_mii: PHY (0) ID 7C121 [00:00:00.006,000] phy_mii: phy_mii_cfg_link: PHY (0) Link already configured [00:00:00.015,000] eth_nxp_enet_qos_mac: Can't clear SWR [00:00:00.021,000] eth_nxp_enet_qos_mac: Link is down *** Booting Zephyr OS build v4.4.2 *** Starting application and checking MDIO bus... PHY Reg 0x01 (BMSR): 0x7809 PHY Reg 0x05 (Partner Ability): 0xCDE1 PHY Reg 0x1A (Symbol Errors): 51 [00:00:04.029,000] phy_mii: check_autonegotiation_completion: PHY (0) auto-negotiate timeout [00:00:14.042,000] phy_mii: update_link_state: PHY (0) Starting MII PHY auto-negotiate sequence [00:00:14.052,000] phy_mii: check_autonegotiation_completion: PHY (0) auto-negotiate sequence completed [00:00:14.062,000] phy_mii: PHY (0) Link speed 100 Mb, full duplex [00:00:14.069,000] eth_nxp_enet_qos_mac: Link is up [00:00:14.075,000] eth_nxp_enet_qos_mac: eth_nxp_enet_qos_phy_cb: Link Speed 100MBit or higher It seems like MDIO comms is working fine but link keeps resetting every 30ms. Any clue as to what configuration needs to be to get LAN8741A to work properly on the FRDM-MCXN947 board? Development Board 回复: FRDM-MCXN947 Ethernet port set up - PHY LAN8741A Hi @thisisdarlensonl
Thanks for the detailed information. To help us further investigate this issue, could you please provide the following information?
Which Zephyr sample are you using? Your prj.conf, application overlay file, and build command. Have you made any changes to the FRDM-MCXN947 board DTS? Could you provide the complete log showing the link resetting every 30 ms? I want to reproduce this issue.
BR
Harry 回复: FRDM-MCXN947 Ethernet port set up - PHY LAN8741A Hi Harry, Thanks for getting back to me. I have attached the prj.cong and app.overlay file. I started with a hello world sample and build on that. The current version of Zephyr is 4.4.2 As for full console messages. See below [00:00:00.000,000] phy_mii: PHY (0) ID 7C121 [00:00:00.006,000] phy_mii: phy_mii_[00:00:00.000,000] phy_mii: PHY (0) ID 7C121 [00:00:00.006,000] phy_mii: phy_mii_cfg_link: PHY (0) Link already configured [00:00:00.015,000] eth_nxp_enet_qos_mac: Can't clear SWR [00:00:00.021,000] eth_nxp_enet_qos_mac: Link is down *** Booting Zephyr OS build v4.4.2 *** === FRDM-MCXN947 PM-Optimized Heartbeat Demo === Starting application and checking MDIO bus... PHY Reg 0x01 (BMSR): 0x7809 PHY Reg 0x05 (Partner Ability): 0xCDE1 PHY Reg 0x1A (Symbol Errors): 51 [00:00:04.029,000] phy_mii: check_autonegotiation_completion: PHY (0) auto-negotiate timeout [00:00:14.042,000] phy_mii: update_link_state: PHY (0) Starting MII PHY auto-negotiate sequence [00:00:14.052,000] phy_mii: check_autonegotiation_completion: PHY (0) auto-negotiate sequence completed [00:00:14.062,000] phy_mii: PHY (0) Link speed 100 Mb, full duplex [00:00:14.069,000] eth_nxp_enet_qos_mac: Link is up [00:00:14.075,000] eth_nxp_enet_qos_mac: eth_nxp_enet_qos_phy_cb: Link Speed 100MBit or higher [00:00:14.085,000] eth_nxp_enet_qos_mac: eth_nxp_enet_qos_phy_cb: Link Full Duplex [00:00:15.094,000] phy_mii: PHY (0) is down [00:00:15.098,000] eth_nxp_enet_qos_mac: Link is down [00:01:08.626,000] phy_mii: update_link_state: PHY (0) Starting MII PHY auto-negotiate sequence [00:01:08.636,000] phy_mii: check_autonegotiation_completion: PHY (0) auto-negotiate sequence completed [00:01:08.646,000] phy_mii: PHY (0) Link speed 100 Mb, full duplex [00:01:08.653,000] eth_nxp_enet_qos_mac: Link is up [00:01:08.659,000] eth_nxp_enet_qos_mac: eth_nxp_enet_qos_phy_cb: Link Speed 100MBit or higher [00:01:08.668,000] eth_nxp_enet_qos_mac: eth_nxp_enet_qos_phy_cb: Link Full Duplex [00:01:09.177,000] phy_mii: PHY (0) is down [00:01:09.182,000] eth_nxp_enet_qos_mac: Link is down [00:01:22.193,000] phy_mii: update_link_state: PHY (0) Starting MII PHY auto-negotiate sequence [00:01:22.203,000] phy_mii: check_autonegotiation_completion: PHY (0) auto-negotiate sequence completed [00:01:22.213,000] phy_mii: PHY (0) Link speed 100 Mb, full duplex [00:01:22.220,000] eth_nxp_enet_qos_mac: Link is up [00:01:22.226,000] eth_nxp_enet_qos_mac: eth_nxp_enet_qos_phy_cb: Link Speed 100MBit or higher [00:01:22.235,000] eth_nxp_enet_qos_mac: eth_nxp_enet_qos_phy_cb: Link Full Duplex [00:01:22.744,000] phy_mii: PHY (0) is down [00:01:22.749,000] eth_nxp_enet_qos_mac: Link is down [00:03:57.817,000] phy_mii: update_link_state: PHY (0) Starting MII PHY auto-negotiate sequence [00:03:57.827,000] phy_mii: check_autonegotiation_completion: PHY (0) auto-negotiate sequence completed [00:03:57.837,000] phy_mii: PHY (0) Link speed 100 Mb, full duplex [00:03:57.844,000] eth_nxp_enet_qos_mac: Link is up [00:03:57.850,000] eth_nxp_enet_qos_mac: eth_nxp_enet_qos_phy_cb: Link Speed 100MBit or higher [00:03:57.859,000] eth_nxp_enet_qos_mac: eth_nxp_enet_qos_phy_cb: Link Full Duplex [00:03:58.368,000] phy_mii: PHY (0) is down [00:03:58.373,000] eth_nxp_enet_qos_mac: Link is down [00:05:08.907,000] phy_mii: update_link_state: PHY (0) Starting MII PHY auto-negotiate sequence [00:05:08.917,000] phy_mii: check_autonegotiation_completion: PHY (0) auto-negotiate sequence completed [00:05:08.927,000] phy_mii: PHY (0) Link speed 100 Mb, full duplex [00:05:08.934,000] eth_nxp_enet_qos_mac: Link is up [00:05:08.940,000] eth_nxp_enet_qos_mac: eth_nxp_enet_qos_phy_cb: Link Speed 100MBit or higher [00:05:08.949,000] eth_nxp_enet_qos_mac: eth_nxp_enet_qos_phy_cb: Link Full Duplex [00:05:09.958,000] phy_mii: PHY (0) is down [00:05:09.963,000] eth_nxp_enet_qos_mac: Link is down [00:05:36.980,000] phy_mii: update_link_state: PHY (0) Starting MII PHY auto-negotiate sequence [00:05:36.990,000] phy_mii: check_autonegotiation_completion: PHY (0) auto-negotiate sequence completed [00:05:37.000,000] phy_mii: PHY (0) Link speed 100 Mb, full duplex [00:05:37.007,000] eth_nxp_enet_qos_mac: Link is up [00:05:37.013,000] eth_nxp_enet_qos_mac: eth_nxp_enet_qos_phy_cb: Link Speed 100MBit or higher [00:05:37.022,000] eth_nxp_enet_qos_mac: eth_nxp_enet_qos_phy_cb: Link Full Duplex [00:05:38.031,000] phy_mii: PHY (0) is down [00:05:38.036,000] eth_nxp_enet_qos_mac: Link is down [00:12:00.195,000] phy_mii: update_link_state: PHY (0) Starting MII PHY auto-negotiate sequence [00:12:00.205,000] phy_mii: check_autonegotiation_completion: PHY (0) auto-negotiate sequence completed [00:12:00.215,000] phy_mii: PHY (0) Link speed 100 Mb, full duplex [00:12:00.222,000] eth_nxp_enet_qos_mac: Link is up [00:12:00.228,000] eth_nxp_enet_qos_mac: eth_nxp_enet_qos_phy_cb: Link Speed 100MBit or higher [00:12:00.237,000] eth_nxp_enet_qos_mac: eth_nxp_enet_qos_phy_cb: Link Full Duplex [00:12:00.746,000] phy_mii: PHY (0) is down [00:12:00.751,000] eth_nxp_enet_qos_mac: Link is down [00:13:41.297,000] phy_mii: update_link_state: PHY (0) Starting MII PHY auto-negotiate sequence [00:13:41.307,000] phy_mii: check_autonegotiation_completion: PHY (0) auto-negotiate sequence completed [00:13:41.317,000] phy_mii: PHY (0) Link speed 100 Mb, full duplex [00:13:41.324,000] eth_nxp_enet_qos_mac: Link is up [00:13:41.330,000] eth_nxp_enet_qos_mac: eth_nxp_enet_qos_phy_cb: Link Speed 100MBit or higher [00:13:41.340,000] eth_nxp_enet_qos_mac: eth_nxp_enet_qos_phy_cb: Link Full Duplex [00:13:41.848,000] phy_mii: PHY (0) is down [00:13:41.853,000] eth_nxp_enet_qos_mac: Link is down [00:14:02.868,000] phy_mii: update_link_state: PHY (0) Starting MII PHY auto-negotiate sequence [00:14:02.877,000] phy_mii: check_autonegotiation_completion: PHY (0) auto-negotiate sequence completed [00:14:02.888,000] phy_mii: PHY (0) Link speed 100 Mb, full duplex [00:14:02.894,000] eth_nxp_enet_qos_mac: Link is up [00:14:02.900,000] eth_nxp_enet_qos_mac: eth_nxp_enet_qos_phy_cb: Link Speed 100MBit or higher [00:14:02.910,000] eth_nxp_enet_qos_mac: eth_nxp_enet_qos_phy_cb: Link Full Duplex [00:14:03.418,000] phy_mii: PHY (0) is down [00:14:03.423,000] eth_nxp_enet_qos_mac: Link is down [00:14:26.439,000] phy_mii: update_link_state: PHY (0) Starting MII PHY auto-negotiate sequence [00:14:26.448,000] phy_mii: check_autonegotiation_completion: PHY (0) auto-negotiate sequence completed [00:14:26.459,000] phy_mii: PHY (0) Link speed 100 Mb, full duplex [00:14:26.466,000] eth_nxp_enet_qos_mac: Link is up [00:14:26.471,000] eth_nxp_enet_qos_mac: eth_nxp_enet_qos_phy_cb: Link Speed 100MBit or higher [00:14:26.481,000] eth_nxp_enet_qos_mac: eth_nxp_enet_qos_phy_cb: Link Full Duplex [00:14:27.490,000] phy_mii: PHY (0) is down [00:14:27.495,000] eth_nxp_enet_qos_mac: Link is down [00:19:14.115,000] phy_mii: update_link_state: PHY (0) Starting MII PHY auto-negotiate sequence [00:19:14.125,000] phy_mii: check_autonegotiation_completion: PHY (0) auto-negotiate sequence completed [00:19:14.135,000] phy_mii: PHY (0) Link speed 100 Mb, full duplex [00:19:14.142,000] eth_nxp_enet_qos_mac: Link is up [00:19:14.148,000] eth_nxp_enet_qos_mac: eth_nxp_enet_qos_phy_cb: Link Speed 100MBit or higher [00:19:14.158,000] eth_nxp_enet_qos_mac: eth_nxp_enet_qos_phy_cb: Link Full Duplex [00:19:14.666,000] phy_mii: PHY (0) is down [00:19:14.671,000] eth_nxp_enet_qos_mac: Link is down [00:20:45.214,000] phy_mii: update_link_state: PHY (0) Starting MII PHY auto-negotiate sequence [00:20:45.223,000] phy_mii: check_autonegotiation_completion: PHY (0) auto-negotiate sequence completed [00:20:45.234,000] phy_mii: PHY (0) Link speed 100 Mb, full duplex [00:20:45.240,000] eth_nxp_enet_qos_mac: Link is up [00:20:45.246,000] eth_nxp_enet_qos_mac: eth_nxp_enet_qos_phy_cb: Link Speed 100MBit or higher [00:20:45.256,000] eth_nxp_enet_qos_mac: eth_nxp_enet_qos_phy_cb: Link Full Duplex [00:20:45.764,000] phy_mii: PHY (0) is down [00:20:45.769,000] eth_nxp_enet_qos_mac: Link is down [00:25:14.383,000] phy_mii: update_link_state: PHY (0) Starting MII PHY auto-negotiate sequence [ 回复: FRDM-MCXN947 Ethernet port set up - PHY LAN8741A Hi @thisisdarlensonl
Thank you for the additional information.
For a quick verification, I tested the Zephyr DHCPv4 client sample using the following command:
west build -b frdm_mcxn947/mcxn947/cpu0 zephyr/samples/net/dhcpv4_client -p always
Initially, I observed a similar issue on my FRDM-MCXN947 board. After checking the board hardware, I found that SJ27 had been reworked.
After restoring SJ27 to its default position, I ran the same DHCPv4 client example again and the issue no longer occurred. The PHY was detected correctly and the Ethernet link came up at 100 Mbps full duplex:
[00:00:00.050,000] phy_mii: PHY (0) ID 7C121
*** Booting Zephyr OS build v4.4.0-17350-g1ee3b93134be ***
[00:00:00.051,000] net_dhcpv4_client_sample: Run dhcpv4 client
[00:00:00.051,000] net_dhcpv4_client_sample: Start on ethernet@40100000: index=1
[00:00:03.758,000] phy_mii: PHY (0) Link speed 100 Mb, full duplex
Could you please check whether SJ27 or any other Ethernet-related solder jumpers on your FRDM-MCXN947 board have been reworked? If so, please restore them to the default Ethernet configuration and test again.
BR
Harry
回复: FRDM-MCXN947 Ethernet port set up - PHY LAN8741A Thanks @Harry_Zhang, massive help legend. I didn't realize that it was configured for display by default. Now I can move on. Thanks a lot for your help. It is probably worthwhile noting this somewhere else. Also, the solder jumpers are painful 😉 Again massive thanks
View full article