esp_eth_disable() crash
Posted: Sun Jan 06, 2019 9:08 am
HI guys,
So I have came across an issue with lan8720 and pico-d4. I noticed there is no IP lost timer for ETH interface, so If my link is up and I lost IP I won't know about it (ex: if router gets disconnected from a switch that esp is connected to).
My attempt to fix the issue:
--Ping the gateway address and if I get too many timeouts then disable and re-enable the eth interface that way I know when I get my IP back again.
However the issue is that calling either esp_eth_disable() or esp_eth_deinit() results in a weird situation which looks like a halt.
After the call I get:
D (28658) emac: emac stop
D (28659) emac: eth link_down
after these two lines, everything stops and the watchdog doesn't even reset the esp.
Can someone please test and confirm this? I haven't been able to pinpoint the issue yet.
Thanks!
So I have came across an issue with lan8720 and pico-d4. I noticed there is no IP lost timer for ETH interface, so If my link is up and I lost IP I won't know about it (ex: if router gets disconnected from a switch that esp is connected to).
My attempt to fix the issue:
--Ping the gateway address and if I get too many timeouts then disable and re-enable the eth interface that way I know when I get my IP back again.
However the issue is that calling either esp_eth_disable() or esp_eth_deinit() results in a weird situation which looks like a halt.
After the call I get:
D (28658) emac: emac stop
D (28659) emac: eth link_down
after these two lines, everything stops and the watchdog doesn't even reset the esp.
Can someone please test and confirm this? I haven't been able to pinpoint the issue yet.
Thanks!