cancel
Showing results for 
Search instead for 
Did you mean: 

How to increase the speed of LwIP RX?

one V
Associate III
Posted on March 23, 2018 at 11:30

0690X0000060AE7QAM.png

CubeMX4.25 + STM32H743 + LwIP2.03

7 REPLIES 7
Andrew Neil
Evangelist III
Posted on March 23, 2018 at 13:38

The first thing is to find what's limiting the speed ...

Posted on March 23, 2018 at 13:45

Profiling the code, and instrumenting the IRQ handler might provide insight.

I'd presume there is a lot of serialized mentality in the examples. Look for examples using threaded execution and that can handle a lot of inflight packets efficiently.

You might also try other stacks.

Note that 192.168.xxx.xxx addresses are LOCAL, millions of people use these same address ranges in there local networks and on routers, they aren't secret or accessible from the greater internet.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on March 23, 2018 at 13:56

Clive One wrote:

You might also try other stacks.

Indeed.

Remember that the 'Lw' in

Lw

IP stands for Lightweight. So the key focus of this stack is on code economy - not necessarily on performance...

EDIT

Also remember that LwIP is an independent 3rd-party tool - nothing specifically to do with ST.

For LwIP info & support, see: 

https://savannah.nongnu.org/projects/lwip/

 

It is widely used - so some general googling may reveal potential optimisations not related to ST ...

Joerg Wagner
Senior III
Posted on March 25, 2018 at 01:10

The first thing you should tune in lwipopts.h is the conservative MTU size and the appropiate parameters.

I modified the CubeMX xml file to have the right values for every new project.

Posted on June 28, 2018 at 11:16

Joerg Wagner wrote:

The first thing you should tune in lwipopts.h is the conservative MTU size and the appropiate parameters.

I modified the CubeMX xml file to have the right values for every new project.

What are the basic parameters that you tune in CubeMX to increase speed ? Can you share your settings or give an advice for CubeMX lwIP parameters?

Posted on June 28, 2018 at 13:59

Thank you for your reply. I adjusted some parameters and the speed is much better.

Posted on June 28, 2018 at 14:13

If you remember could you give some trick about which parameters i must adjust ?