lwIPStack_init() is blocking if ethernet(RJ45) is not connected

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Not applicable
Hello, I use LwIP(ETH004) to make UDP-communication on my XMC4500 Relax Kit.

It works, but if the Ethernet-connector is not plugged in, then my application does not start.
I found, that lwIPStack_init() does not return.

In "EthernetPHY.c" I found an enless loop:
do {} while(PHY_lIsAutoNegoComplete() != TRUE);

I changed this to a single call:
PHY_lIsAutoNegoComplete();

After this change all works fine. Is this ok, or are there some drawbacks?



Best regards,
torsten
0 Likes
0 Replies