-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Problem with ethernet init after reset #6142
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
Comments
IMO the delay should be in ETH.begin(); Specifically: Possibly around here: tcpipInit(); is called both before and after ethernet options are configured. It may take device testing to verify where the delay should be. |
This is due to the reset-/supervisor-chip |
About this, do you also see this happening when the unit crashes? |
Hello, can you please retest this on v2.0.3-rc1? |
I'm closing this one as solved, if you still face the issue on latest v2.0.3-rc1 please reopen the issue. |
Board
ESP32-EVB rev.I
Device Description
The ESP32-EVB is connected only to the computer through USB-Micro cable (for power and serial monitor) and router via standard LAN cable.
Hardware Configuration
No external hardware or boards attached to the ESP32-EVB
Version
latest master
IDE Name
Arduino 1.8.13
Operating System
Windows 10
Flash frequency
80MHz
PSRAM enabled
no
Upload speed
115200
Description
Hello!
I am an employee of Olimex and we have found a problem (that is specific for one of our boards) with the default ethernet example provided with the package (ETH_LAN8720).
On some of our boards ESP32-EVB rev.I (and older) there is a problem with ethernet initialization (ETH.begin () call) immediately after reset. If the USB is unplugged and plugged again it works fine but whenever the reset button is pressed the PHY can't initialize.
After some testing we have figured out that the ESP starts while the PHY is still in reset. And adding a simple delay of 300-350 milliseconds at the start of the sketch solves the issue. But that leaves the question how to implement this change considering the code is part of your package.
I was about to do a pull request but wasn't sure where exactly should I add it. I know that using a preprocessor #if and the macro definition of the board I can isolate this change specifically for ESP32-EVB so it doesn't affect the example for any other.
It's simple for coding - just add
at the start of the setup function. But I also don't think this is the appropriate place considering this code is supposed to be an example that is a starting point for further sketch development and placing the code there is somewhat ugly.
Is there a more elegant way to implement this change into the package making it specific for ESP32-EVB only (for example adding it somehow to the board variant files or something like that)?
Sketch
The default Ethernet --> ETH_LAN8720 example
Debug Message
Other Steps to Reproduce
With this initialization in the setup() it works
I have checked existing issues, online documentation and the Troubleshooting Guide
The text was updated successfully, but these errors were encountered: