ESP32-EVB: Ethernet periodic loss of connectivity

Started by guide53, February 06, 2024, 06:55:35 PM

Previous topic - Next topic



I am also experiencing ethernet connectivity issues with 3 new ESP32-EVB boards.
All boards are HW revision K1 (2x ESP-EVB-IND + 1x ESP-EVB-EA-IND).
No modifications yet (e.g. 1nF capacitor "patch" on PHY_RST1 was not used).

The ethernet sample code will run without problems, but with a more complex application every board is periodically switching on/off the LAN link.
This is happening about every 9-10 seconds, no influence of cold or warm starts.

First I thought it might be an incompatibility to the LAN switch auto-negotiation.
But after testing 3 differenz switch models, this is not the problem cause.
Unfortunately there is no link speed parameter inside of the esp32 (LAN8710A) ethernet driver code?

But there is one interesting fact that might guide to a solution:
In my case, the LAN connectivity loss is only present when powering the boards over the external power connector (PWR1)!

It is not depending on the type/model of power supply. I tried 3 different power supplies (1x USB, 1x switching supply, 1x laboratory supply), all the same error.

All 3 boards will operate with stable ethernet connection, when powered by these two conditions (bypassing the external power circuit components):
+ Usage of the USB port or
+ Direct power ingestion via expansion slot (PIN39, PIN40)

Also tried with all 3 power supplies (External connector = failure, direct power = no problem).

So, perhaps there might be some voltage and/or current constraints with the diode D6 or the FET transistor FET2 ?



This is very strange to be honest.

If it was related to the power supply the whole board would reboot. Does the whole board reboot or just the Ethernet?

Indeed it feels like the power adapter gives up once more current is required,
but you tested with different power supplies. If you are using adjustable supply, try what happens if you set the voltage to 5.1V or 5.2V instead of 5.0V.

By the way can you try to connect the power supply to the pins below the power jack? Just be careful with polarity. Maybe the issue is in your power jack?

1. In revision K1 boards you don't need to do any modifications. Those are already done. Don't do hardware modifications.

2. "The ethernet sample code will run without problems, but with a more complex application every board is periodically switching on/off the LAN link."

I believe this might show that the problem is in the "more complex application", e.g. in the software. For example, setting one of the pins responsible for the Ethernet to other function or peripheral.

What exactly is the code? Do you switch the relays, have other boards powered from the ESP32-EVB?

2. "Unfortunately there is no link speed parameter inside of the esp32 (LAN8710A) ethernet driver code?"

There are definitely ways to measure speed. What software are you using?
Technical support and documentation manager at Olimex


Yes it IS a strange thing - I didn't believe it on first sight.

No, the board is not rebooting, just ethernet (link LED will switch off/on, also on the LAN switch).

The board is driving the BSB-LAN application (see github:fredlcore/BSB-LAN). It is operating a web service and some background bus and 1-wire sensor processing.
As far as I could see until now it is using the standard arduino/esp32/ethernet libraries.
I will check now if there are any special modifications on that one and/or pin operations that might interfere with the LAN chip.

What I mean regarding the ethernet driver code is the lack of a "link speed definition" on driver setup. You can just set the LAN chipset (ETH_PHY_TYPE), address (ETH_PHY_ADDR) adn Clock Settings (ETH_CLK_MODE). But there is no such parameter for link speed and/or auto-negotiation settings. Sometimes setting a fixed speed might fix such problems.
In your ESP32-EVB schematic there is a comment on this: "The PHY is setted as follows: MODE: All capable (10/100Base)", so auto-negotiation seems to be "hard-coded" into the LAN8710A?

I will check the software code in details and also the powering bypassing the connector.

The power voltage does not seem to matter. I have already raised the external power voltage level with the laboratory supply up to 5.2 Volt on the external connector. This was neccesary to have full 5.0 Volt on the "internal" 5V layer.
It did not fix the problem. For the LAN8710A chip it can not matter, because it is powered by the 3.3V layer (which is converted by the U2 chip, so it should not bother on the 5V level).

Stay tuned, we are still on track.