-
Notifications
You must be signed in to change notification settings - Fork 7.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[TW#25929] ethernet: infinite loop if phy cannot be initialized (IDFGH-1743) #2331
Comments
Linking with #2141 |
Thank you for the link, I hope it will be addressed in the esp-idf. |
The issue is slightly different than the linked one as the blocking occurs on different place in code. It looks like there are infinite loops in the ethernet componnent in several places. |
Yes I know, just suggesting they should be fixed together. Some of the while loops for the internal Mac registers might be ok although maybe not if something kills the peripheral clock. |
I'm aware that this issue is mainly caused by the hardware issues (in my case it was the bad wiring between ESP32 and the lan8720 module). Nevertheless, it should be handled by the software. |
I also had same situation ones but bug gone after turn off/on power and never happened again |
@loboris Thanks for your advice. The infinite loop problem will be fixed in the newest master branch later. |
1. fix infinite loop problem when init phy device 2. fix infinite loop problem when reset mac 3. fix little bugs in ethernetif_init 4. fix incompatible return value between lwip and esp-idf Closes espressif/esp-idf#2331 Closes espressif/esp-idf#2141
hi everyone. i'm facing the same issue but with different ethernet shield. FYI, i'm using ENC28J60 and following are the error appear on arduino serial monitor.
i did the test using example code in the library from http://www.fisch.lu/junk/ESP32-Ethernet.zip hope the details above will provide enough information regarding this issue. regards. |
Both phy_lan8720_init() and phy_tlk110_init() calls esp_eth_smi_wait_value() in an infinite loop which, in case phy cannot be initialized for some reason, blocks the whole system, eventually causing task watchdog timeout.
I think there should some kind of timeout, the function should exit with failed status which should propagate to
esp_eth_enable()
function, returningESP_FAIL
.The text was updated successfully, but these errors were encountered: