cancel
Showing results for 
Search instead for 
Did you mean: 

Maximum data thoughput on TCP/IP using LwIP?

mjulier
Associate II
Posted on June 09, 2016 at 10:36

I plan to use an STM32F207 for data acquisition, as a TCP/IP server, using LwIP. The data would come from an FPGA using a parallel bus (F207 has FSMC for external SRAM and similar).

Does anybody have an idea of the maximum throughput using LwIP and the embedded MAC?

So far, I am reaching 30 Mb/s, using a 8051 (AT89S8253 at 24 MHz and 2 Minstructions/s), a WizNET W5100 offload processor (in parallel mode except during configuration), and a DMA transfer from the FPGA to the W5100. I am wondering whether passing through the STM32F207 is a viable option.

I have read some comments suggesting that the integration of LwIP in the ST library is buggy and works only at very low data rate: can anybody tell from experience?
5 REPLIES 5
Walid FTITI_O
Senior II
Posted on June 09, 2016 at 14:32

Hi Miguel,

The maximum Ethernet packet size is 1522 bytes. Refer to this application note 

http://www.st.com/content/ccc/resource/technical/document/application_note/fd/5d/64/cf/7c/38/4c/30/DM00036052.pdf/files/DM00036052.pdf/jcr:content/translations/en.DM00036052.pdf

  .

http://www.st.com/content/ccc/resource/technical/document/user_manual/65/e8/20/db/16/36/45/f7/DM00103685.pdf/files/DM00103685.pdf/jcr:content/translations/en.DM00103685.pdf

is a user manual about “Developing applications on STM32Cube with LwIP TCP/IP stack� which can help you a lot to go further in your application.

-Hannibal-

Posted on June 09, 2016 at 23:07

I don't think the question was asking about the MTU, or wanting to do a ton of work to determine the bandwidth.

If you don't like LwIP, then use a different stack, people make a business of it. I suspect the Ethernet controller could saturate the bus if desired, supplying data via the external bus (memory mapped FPGA) is going to be significantly slower that internal memory. I'd suppose 21 or 42 MBps would be viable on the memory bus.

For high rate data input, consider synchronous DCMI connection.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
mjulier
Associate II
Posted on June 15, 2016 at 14:46

Indeed, my point is not to findout the MTU, but not to loose time making tests in case other people already found that this solution cannot be fast enough for me.

I am not too anxious the external FPGA link: FSMC can go up to 60 MHz so even with 5 cycles per byte, at 8 bits, I would still get 100 Mb/s, in DMA mode. But I need TCP/IP in 100 M

AvaTar
Lead
Posted on June 15, 2016 at 15:16

> But I need TCP/IP in 100 M

 

IMHO you need to consider what you need to do ''in between'', i.e. what kind of processing the core needs to do with the received data. That will drastically reduce your effective throughput.

There are lots of ''My IoT application suddenly crashes after minutes/hours/days ...'' on several MCU fora across the vendor spectrum, almost always because temporary netload peaks overload the core.

mjulier
Associate II
Posted on June 23, 2016 at 09:39

I know what I need to do on my side.

My only question is about the performance of the LwIP library as implemented in the software package provided with the STM32F207: is the maximum throughput close to 10 MB/s, or rather close to 1 kB/s.

Somebody might have tried, so I asked the question. If nobody knows, no problem, just don't feel compelled to say something that brings no useful information.