cancel
Showing results for 
Search instead for 
Did you mean: 

Changing uIP to LWIP on the STM32_ETH_Lib demonstration sample

ams1
Associate II
Posted on January 06, 2010 at 09:40

Changing uIP to LWIP on the STM32_ETH_Lib demonstration sample

9 REPLIES 9
ams1
Associate II
Posted on May 17, 2011 at 13:30

Someone knows the steps how to change the uIP for the LwIP TCP/IP Stack based on STM32_ETH_Lib uIP demonstration sample.

tomas23
Associate II
Posted on May 17, 2011 at 13:30

The lwIP is a derivative of uIP. My experience in porting between different stacks in the uIP family is, that it's very easy after all:

All the interface is in the uIPmain loop (1 call to ETH_GetPacket and 2 (4) calls to ETH_SendPacket), so take lwIP and exchange the functions interfacing to HW (or ETH library).

Don't forget their init code, but in ST case it's rather separated.

16-32micros
Associate III
Posted on May 17, 2011 at 13:30

Dear all,

We will publish soon ( in the coming days) a complete Application Note using LwIP stack with many examples and code optimized for STM32 Connectivity line, You can wait for it and not loose your time while porting from µIP

Cheers,

STOne-32

niko
Associate II
Posted on May 17, 2011 at 13:30

Make sure that you do DMA directly in and out of lwIP pbufs, not copying data to intermedeate buffers. Also use checksum offloading to increase throughput. To do this you need to change lwIP ICMP code so that it will not generate checksums, other parts of lwIP can be made to ignore checksums by using #defines.

With correct use of DMA and checksum offloading stm32f107 can achieve pretty good ETH throughput. At least in my experiences with adequate number of input descriptors mcu can correctly input all udp data that modern windows workstation can output without dropping a packet.

I think that if you can provide good ports of FreeRTOS and lwIP to stm32 you will increase the appeal of stm32 to developpers, not to mention lower the threshold of starting app development. Both FreeRTOS and lwIP have already been ported to stm32 but at least the ports I've seen have poorly implemented ETH interfacing.

And btw, if you choose the FreeRTOS approach, make sure to be extra carefull with those bit-field variables in USB OTG library code as FreeRTOS will usually (you can change this through #defines though) init stack to some magic value :)

paul16
Associate II
Posted on May 17, 2011 at 13:30

Any News on when the LWIP version will be released?

is there a beta test version availble?

16-32micros
Associate III
Posted on May 17, 2011 at 13:30

Hi all,

Here you go : AN3102 : lwIP TCP/IP stack demonstration for STM32F107xx connectivity line microcontrollers

http://www.st.com/stonline/products/literature/an/16620.pdf

&

http://www.st.com/stonline/products/support/micro/files/an3102.zip

Enjoy it ;)

Cheers,

STOne-32.

paul16
Associate II
Posted on May 17, 2011 at 13:30

Thanks, working well

trevor1
Associate II
Posted on May 17, 2011 at 13:30

Very nice. Any plans for same using PPP instead of Ethernet?

johan239955_st
Associate II
Posted on May 17, 2011 at 13:30

Good question! Any news about using PPP instead of Ethernet?