Skip to main content
ams1
Associate II
January 6, 2010
Question

Changing uIP to LWIP on the STM32_ETH_Lib demonstration sample

  • January 6, 2010
  • 9 replies
  • 2017 views
Posted on January 06, 2010 at 09:40

Changing uIP to LWIP on the STM32_ETH_Lib demonstration sample

    This topic has been closed for replies.

    9 replies

    16-32micros
    Associate III
    May 17, 2011
    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

    tomas23
    Visitor II
    May 17, 2011
    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.

    ams1
    ams1Author
    Associate II
    May 17, 2011
    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.

    paul16
    Associate
    May 17, 2011
    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?

    niko
    Associate II
    May 17, 2011
    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
    May 17, 2011
    Posted on May 17, 2011 at 13:30

    Thanks, working well

    16-32micros
    Associate III
    May 17, 2011
    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.

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

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

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

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