Page 1 of 1
ESP32 and W5500 ethernet performance
Posted: Mon Dec 11, 2023 12:38 am
by MikeMyhre
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?
Re: ESP32 and W5500 ethernet performance
Posted: Mon Dec 11, 2023 8:01 am
by ESP_ondrej
See below for same performance comparison (for ESP32).
+---------------------+---------+------------+---------+
| Proto / direction | EMAC | KSZ8851* | W5500* |
+---------------------+---------+------------+---------+
| TCP Rx [Mbps] | 31 | 13 | 10 |
| TCP Tx [Mbps] | 59 | 15 | 14 |
| UDP Rx [Mbps] | 71 | 17 | 16 |
| UDP Tx [Mbps] | >80** | 20 | 17 |
+---------------------+---------+------------+---------+
* @SPI 40 MHz
** 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
Re: ESP32 and W5500 ethernet performance
Posted: Tue Dec 12, 2023 2:48 am
by MikeMyhre
Thank you. That microchip KSZ8863 looks like the part I need.
Re: ESP32 and W5500 ethernet performance
Posted: Tue Dec 12, 2023 9:55 am
by ESP_ondrej
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.).
Re: ESP32 and W5500 ethernet performance
Posted: Fri Dec 15, 2023 5:45 pm
by MikeMyhre
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.
Re: ESP32 and W5500 ethernet performance
Posted: Fri Dec 22, 2023 6:34 pm
by ESP_ondrej
Could you please clarify what do you mean by W5500 EMAC mode?
Re: ESP32 and W5500 ethernet performance
Posted: Fri Dec 22, 2023 6:41 pm
by MikeMyhre
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).
+---------------------+---------+------------+---------+
| Proto / direction | EMAC | KSZ8851* | W5500* |
+---------------------+---------+------------+---------+
| TCP Rx [Mbps] | 31 | 13 | 10 |
| TCP Tx [Mbps] | 59 | 15 | 14 |
| UDP Rx [Mbps] | 71 | 17 | 16 |
| UDP Tx [Mbps] | >80** | 20 | 17 |
+---------------------+---------+------------+---------+
* @SPI 40 MHz
** 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.