IDE: MCUXpresso IDE v11.4.1. Board: MIMXRT1024 EVK
SDK example that works: evkmimxrt1024_lwip_udpecho_bm
A new C project is created by selecting the same network middelware options and board components as selected for the SDK example. The *.mex file of the SDK example is imported with all configurations selected. (Strangely there is some sort of conflict with the LPUART1 pins, but those two rows are deleted.) Then code is updated. The complete source code of the SDK ex. main source file (lwip_udpecho_bm.c ) is copied to the main source file of the new empty project. The project is compiled and run. The code execution is now stuck on line
netif_add(&netif, &netif_ipaddr, &netif_netmask, &netif_gw, &enet_config, EXAMPLE_NETIF_INIT_FN, ethernet_input);
while the following text is written to the debug serial port:
PHY Auto-negotiation failed. Please check the cable connection and link partner setting.
I have debugged into the function status_t ENET_MDIO_Read in file fsl_enet_mdio.c where the call
result = ENET_MDIO_WaitTransferOver(base);
returns 2 (readonly ?)
I hope these clues can give someone an idea, why this new project won't auto-negotiate, while the imported SDK lwip_udpecho_bm example works like a charm with the same IP configuration?