ESP32 and W5500 ethernet performance

MikeMyhre
Posts: 41
Joined: Sat Nov 05, 2022 3:32 am

ESP32 and W5500 ethernet performance

Postby MikeMyhre » Mon Dec 11, 2023 12:38 am

I am starting a new project that requires and ESP32 variant and two ethernet ports. I like using the W5500 part but for this project I need 4k video throughput which is in the up to 30Mbps rate range. Performance reports I see for the W5500 seem to be in the 12Mbps range:
https://1byte.tistory.com/44
Not sure if I would need to double this for two ports or if the two SPI ports could run in parallel resulting in only a small hit for the second port. The problem remains that the W5500 seems to have too slow a performance for my needs.
I see other performance specs, this one claims rates of 80 Mbps using a ENC28J60 chip. The claim is it is a MAC internal vs external issue.
https://esp32.com/viewtopic.php?t=2013
Does anyone have any experience/comments with this?

ESP_ondrej
Posts: 181
Joined: Fri May 07, 2021 10:35 am

Re: ESP32 and W5500 ethernet performance

Postby ESP_ondrej » Mon Dec 11, 2023 8:01 am

See below for same performance comparison (for ESP32).
  1. +---------------------+---------+------------+---------+
  2. | Proto / direction   |  EMAC   |  KSZ8851*  |  W5500* |
  3. +---------------------+---------+------------+---------+
  4. | TCP Rx [Mbps]       |  31     |        13  |      10 |
  5. | TCP Tx [Mbps]       |  59     |        15  |      14 |
  6. | UDP Rx [Mbps]       |  71     |        17  |      16 |
  7. | UDP Tx [Mbps]       |  >80**  |        20  |      17 |
  8. +---------------------+---------+------------+---------+
  9.  
  10. * @SPI 40 MHz
  11. ** SW BW limit
Achieving 80 Mbps with ENC28J60 chip is nonsense since this chip supports only 10Mbps link.

If you need two Ethernet ports, consider using https://github.com/espressif/esp-eth-dr ... /README.md

MikeMyhre
Posts: 41
Joined: Sat Nov 05, 2022 3:32 am

Re: ESP32 and W5500 ethernet performance

Postby MikeMyhre » Tue Dec 12, 2023 2:48 am

ESP_ondrej wrote:
Mon Dec 11, 2023 8:01 am
If you need two Ethernet ports, consider using https://github.com/espressif/esp-eth-dr ... /README.md
Thank you. That microchip KSZ8863 looks like the part I need.

ESP_ondrej
Posts: 181
Joined: Fri May 07, 2021 10:35 am

Re: ESP32 and W5500 ethernet performance

Postby ESP_ondrej » Tue Dec 12, 2023 9:55 am

Just note that performance may vary. It is affected by your application code, cache misses, etc. Difference between KSZ8851 and W5500 is not that significant. Therefore, if I were you, I would also consider other factors (price, availability, etc.).

MikeMyhre
Posts: 41
Joined: Sat Nov 05, 2022 3:32 am

Re: ESP32 and W5500 ethernet performance

Postby MikeMyhre » Fri Dec 15, 2023 5:45 pm

ESP_ondrej wrote:
Tue Dec 12, 2023 9:55 am
Just note that performance may vary. It is affected by your application code, cache misses, etc. Difference between KSZ8851 and W5500 is not that significant. Therefore, if I were you, I would also consider other factors (price, availability, etc.).
I don't think the W5500 can work in the EMAC mode and I need the performance that it offers.

ESP_ondrej
Posts: 181
Joined: Fri May 07, 2021 10:35 am

Re: ESP32 and W5500 ethernet performance

Postby ESP_ondrej » Fri Dec 22, 2023 6:34 pm

Could you please clarify what do you mean by W5500 EMAC mode?

MikeMyhre
Posts: 41
Joined: Sat Nov 05, 2022 3:32 am

Re: ESP32 and W5500 ethernet performance

Postby MikeMyhre » Fri Dec 22, 2023 6:41 pm

ESP_ondrej wrote:
Fri Dec 22, 2023 6:34 pm
Could you please clarify what do you mean by W5500 EMAC mode?
ESP_ondrej wrote:
Mon Dec 11, 2023 8:01 am
See below for same performance comparison (for ESP32).
  1. +---------------------+---------+------------+---------+
  2. | Proto / direction   |  EMAC   |  KSZ8851*  |  W5500* |
  3. +---------------------+---------+------------+---------+
  4. | TCP Rx [Mbps]       |  31     |        13  |      10 |
  5. | TCP Tx [Mbps]       |  59     |        15  |      14 |
  6. | UDP Rx [Mbps]       |  71     |        17  |      16 |
  7. | UDP Tx [Mbps]       |  >80**  |        20  |      17 |
  8. +---------------------+---------+------------+---------+
  9.  
  10. * @SPI 40 MHz
  11. ** SW BW limit
Achieving 80 Mbps with ENC28J60 chip is nonsense since this chip supports only 10Mbps link.

If you need two Ethernet ports, consider using https://github.com/espressif/esp-eth-dr ... /README.md
As I understand from the table you posted, to get rates in the 80 Mbps range I need to use the internal EMAC. Just using a W5500 can only give me UDP rates in the 20 Mbps which is not enough for my project.
I would rather use a part that gives me two ports in the foot print of the W5500 and the KSZ8863RLL seems to do that. The example you gave uses external magnetics. With a MAGJACK part this could be a very simple circuit.

The W5500 as I am using it handles the MAC in the W5500. It is not just the PHY part of the circuit.

Who is online

Users browsing this forum: Bing [Bot] and 158 guests