Hello,
I'm getting a weird behaviour while trying to run UDP communication on MIMXRT1170-EVK board.
The communication is supposed to run on CM4 core whose code is moved into the SDRAM (starting address: 0x80000000). Now I'm debugging only CM4 core so the CM7 shouldn't have any effect on the behaviour or atleast that's what I would expect.
Now get to the strange behaviour. I'm using the 100M ethernet connector which is supposed to work as UDP communication (and modbus later). I initialize the communication basically through this sequence (it's basically the lwip_ping_cm4 example) :
IP4_ADDR(&netif_ipaddr, configIP_ADDR0, configIP_ADDR1, configIP_ADDR2, configIP_ADDR3);
IP4_ADDR(&netif_netmask, configNET_MASK0, configNET_MASK1, configNET_MASK2, configNET_MASK3);
IP4_ADDR(&netif_gw, configGW_ADDR0, configGW_ADDR1, configGW_ADDR2, configGW_ADDR3);
lwip_init();
netif_add(netif, &netif_ipaddr, &netif_netmask, &netif_gw, &enet_config, NETIF_INIT_FN, ethernet_input);
netif_set_default(netif);
netif_set_up(netif);
It works fine, I'm able to PING the device, send message from PC to MCU which receive it just fine, I even pass the "cable testing" right there (which is right under the netif_set_up(netif) from previous code example):
while(ethernetif_wait_linkup(&netif, 500) != ERR_OK) {}
But when it comes to sending message back it goes through all the function ending up inside the ip4_route() function when it comes to testing cable connection by the netif_is_link_up(netif_default)) function.
The only documentation about the NETIF_FLAG_LINK_UP is:
If set, the interface has an active link (set by the network interface driver). Either set by the netif driver in its init function (if the link is up at that time) or at a later point once the link comes up (if link detection is supported by the hardware).
So I guess there's something going on with the Netif driver but I can't figure out what it is since I can normally ping and receive any message. Well not entirely, I mean for some reason there's a slight chance that after sending message from PC to MCU the program will crash looking like this:

But this behaviour is as random as my attempts to fix it since sometimes it happens after first message, sometimes it's after 500th message...
I'm using:
- IDE: MCUXpresso
- SDK: 2.15.00
- Board: MIMXRT1170-EVK
- MCU: MIMXRT1176
I would appriciate any tips what might cause this behaviour.
Best regards,
Michal.