cancel
Showing results for 
Search instead for 
Did you mean: 

Best ethernet config for benchamrking on STM32H753

g2f1
Associate II

Hello, I hope you are doing well.

I am currently working on benchmarking the Ethernet communication interface on an STM32H753 Nucleo board.

My setup involves sending data from a Python script to the STM32, where the data is encrypted, and then sent back. This allows me to measure the RTT and overall throughput.

I initially used Mongoose, but I encountered several issues:

  • With UDP, I cannot reliably send more than ~1500 bytes, since larger packets get fragmented or dropped.
  • TCP works correctly, but the throughput varies significantly depending on payload size. For example:
    • ~2.7 MiB/s for 1400-byte payloads
    • ~7 MiB/s for 10240-byte payloads

I would like to know:

  1. What is the best networking stack or library for STM32 to achieve better performance and properly handle UDP large payloads?
  2. Given that Ethernet is 100 Mbps in my case, I am not reaching near-theoretical throughput even without encryption. Is this because I am measuring not only transmission time but also packet handling, buffering, and processing overhead (e.g., encryption, stack processing)? Is this assumption correct?



Thank you  

6 REPLIES 6
mbarg.1
Lead

Well. I find your question very nice.

We faced the similar problem - we wanted to have a reliable websockets conenction with a bunch (<16) of clients on IP4 and IP6 while flooding the interface with classicl flood of sync.

We were unable to get both freertos and azure stable - our fault probably - and we decided to move to a proprietary solution built on top of azure rtos and STM HAL without netxDuo.

If you mind, I can share the code, but be aware we can do only if you are based in a non-conflict area.

Let me know.

g2f1
Associate II

Hello, what you mean by non-conflict area?

Unfortunately today we see countries invading other countries, pirates assaulting vessels, and many other similar situations.

I do love peace and I share know how as my part of reducing possibles causes of disagreement between humans.

Double check that this know how is used only to increase chances of peace is mandatory.

 

Pavel A.
Super User

This expert posted insightful tips on performance of ETH in STM32H7. Long time haven't seen him here, regretfully.

How to make Ethernet and lwIP working on STM32 - STMicroelectronics Community

 

Zhiyong Li
Associate II

Hi,

Try to take a look at the Composite EMAC driver in Mbed-CE. Jamie did a great job re-implementing the original EMAC driver from STM. I have seen some significant performance boost from discussion here. Jamie had been looking for some real world use-cases that require high performance in embedded system. I am sure he would love to see how it works in your project.

BR,

ZL

Quote from Jamie, he was able to get up to 98Mbs with 100Mbs setup. Please drop a line here, we, both Jamie and me, would be happy to help you setup and see how it works for your project.