Open hzhh110 opened 1 month ago
ETH.begin(ETH_ADDR, ETH_POWER_PIN, ETH_MDC_PIN, ETH_MDIO_PIN, ETH_TYPE, ETH_CLK_MODE);
Hey, I used the Internet (Internet of Things), but I didn't lose the packet, but I lost the packet with LAN ping.
What board do you use? GPIO-16 and 17 are also used for PSRAM, so you have to make sure PSRAM support is disabled or else polling may perhaps offset your Ethernet clock?
Just some other idea, inspired by this PR for Olimex boards: https://github.com/espressif/arduino-esp32/pull/9623 Maybe you can also experiment with setting the GPIO drive capability (drive strength) when using ESP generated clock.
I use the external 50Mhz crystal calibrator to provide the GPIO0 and LAN8720 < ETH CLOCK GPIO0 in > with the crystal calibrator at the same time. The communication is good in the network cable mode, but it will enter the download mode randomly when it is powered on. How to deal with this?It is found that the power-on probability may fail to obtain the chip or the URL by using the ETH CLOCK GPIO0 OUT, the ETH CLOCK GPIO16 OUT, and the ETH CLOCK GPIO17 OUT Want to know how to deal with the ETH CLOCK GPIO0 _ in to solve the problem of probability entering the download mode?
Ah that's a different problem. You 'simply' need to decouple the clock from GPIO-0 before boot. On some crystals there is an enable pin. Maybe you can route some GPIO pin from the ESP to this pin if present? Other solution can be to add some analog switch to route the 50 MHz signal to a not connected pin of the switch and only to GPIO-0 when you enable it via some GPIO of the ESP after boot. (e.g. connect this switch to the Ethernet power pin)
Ah that's a different problem. You 'simply' need to decouple the clock from GPIO-0 before boot. On some crystals there is an enable pin. Maybe you can route some GPIO pin from the ESP to this pin if present? Other solution can be to add some analog switch to route the 50 MHz signal to a not connected pin of the switch and only to GPIO-0 when you enable it via some GPIO of the ESP after boot. (e.g. connect this switch to the Ethernet power pin)
Thank you for your reply. It's a little embarrassing. I don't know where to start. Now there are only IO ports GPIO1 (TX), GPIO3 (RX) and GPIO36 and GPIO39. Of course, there is a red light (GPIO17) that can switch with GPIO1 (TX), but I don't know how to decouple GPIO0.Can you be more specific?
This is how I did it on a board I made which is using those Ali Express LAN8720A chips (with 2x7 pin header)
The chip I used is TS5A3157DCKR The default path of the signal is from the NC to COM (or vice-verse as it is just an analog switch, but that's not used here) When V_LAN is present, the signal will be from NO to COM.
Just consider it to act like a relay, but then capable of switching faster and also perfectly capable of transporting 50 MHz signal from the crystal.
The chip I used is TS5A3157DCKR The default path of the signal is from the NC to COM (or vice-verse as it is just an analog switch, but that's not used here) When V_LAN is present, the signal will be from NO to COM.
Just consider it to act like a relay, but then capable of switching faster and also perfectly capable of transporting 50 MHz signal from the crystal.
Thank you very much
Board
ESP32
Device Description
When I used the network cable mode and the external crystal oscillator, I found that the LAN8720 inch was losing packets. The internal ETH CLOCK GPIO17 _ OUT crystal oscillator is normal, while the external crystal oscillator is connected to the network cable smoothly. The internal crystal oscillator may not be connected to the network cable easily
Is there any way to process the external crystal oscillator with software
Hardware Configuration
LAN8720 using external crystal and using GPIO17 have two different performances, one is the connection problem, the other is the packet loss problem
Version
latest master (checkout manually)
IDE Name
Platformio
Operating System
Mac0S
Flash frequency
40Mhz
PSRAM enabled
yes
Upload speed
115200
Description
LAN8720 using external crystal and using GPIO17 have two different performances, one is the connection problem, the other is the packet loss problem
Sketch
Debug Message
Other Steps to Reproduce
No response
I have checked existing issues, online documentation and the Troubleshooting Guide