2019-09-26 12:41 AM
Hello,
We try to test our Ethernet performance (STM32H7).
We are using a udp echo with LWIP , and we inject udp packets from PC into STM32H7 .
The performance is OK with most packets, but when decreasing packet size below ~300bytes, we start to get packet lost.
My question is:
Thank you,
Ran
Solved! Go to Solution.
2019-11-28 01:44 AM
If you step back and widen your scope, you realize the same kind of question is raised on many MCU fora.
Hardly any MCU of this (Cortex M) class can keep up with real-world ethernet traffic, except in sterilized test environments.
MCUs must be <relatively> cheap to be successful. Ethernet OTOH requires a lot of offline buffer and core performance.
Just check the ethernet peripherals of Cortex A devices, or chips used for PCs. They use to store multiple packages, usually DMA-ed into the core memory space.
Most MCUs use to implement just enough to get it going. But after all, IoT is a marketing fad.
2019-09-26 05:46 AM
Have you seen this thread?
2019-09-26 08:01 AM
The better way is to give up on Lwip and stm32’s hal ethernet libraries, both of which are maddeningly difficult to understand/debug, and use a wiznet chip instead. But if you’re stuck with those, good luck.
2019-11-28 01:12 AM
Hi ranran, I'm facing same issue... Have you solved? How?
Thanks
2019-11-28 01:27 AM
Hi,
I've been struglling with it for a long time actually.
We are using ethernet test equipment (so are you?) and we observe the same packet loss with EVAL board too !
I think that the chip has some HW limitation (but I won't get confirmation for this from ST...), it just can't handle ieee 802.3 standard packets ! That's quite bad.
Thanks for any idea
2019-11-28 01:44 AM
If you step back and widen your scope, you realize the same kind of question is raised on many MCU fora.
Hardly any MCU of this (Cortex M) class can keep up with real-world ethernet traffic, except in sterilized test environments.
MCUs must be <relatively> cheap to be successful. Ethernet OTOH requires a lot of offline buffer and core performance.
Just check the ethernet peripherals of Cortex A devices, or chips used for PCs. They use to store multiple packages, usually DMA-ed into the core memory space.
Most MCUs use to implement just enough to get it going. But after all, IoT is a marketing fad.
2019-11-28 01:57 PM
Dear, @ranran , @TDK , @Ozone and everyone else interested in Ethernet!
Don't take it personal, but the idea, that Cortex-M class MCUs can't handle Ethernet and IP stack decently, is total nonsense, which unfortunately has proliferated STM32 and other communities. Typical Cortex-M3/M4 is more powerful than Intel 80486, which was able to handle Windows 95, and Cortex-M7 is on par with Pentium II. On a RAM side few tens of KB for Ethernet and IP stack buffers are more than enough for high-performance implementation and modern MCUs have much more internal RAM, not even talking about possibility of adding external one.
There are two main reasons leading to that false belief:
Therefore, when the software is done right, Ethernet and lwIP on STM32 MCUs works spectacularly well! And to prove it to others, I've made a demonstration firmware:
2019-11-28 02:12 PM
STM32 HAL is buggy bloatware, but lwIP is pretty solid and stable. Look at my other post and demonstration firmware. WIZnet can't come even close to that performance, functionality and flexibility:
2019-11-28 02:26 PM
Do you sell the code, or what is your idea behind not releasing it?
2019-11-28 10:04 PM
Hello Piranha (Community Member),
Thank you for sharing the demonstration.
I see that you tested it with iperf from another PC host.
We have tested performance using Ethernet test equipment.
Thank you!
ranran