Skip to main content
Visitor II
May 16, 2025
Question

UDP client on STM32H755 with FreeRTOS and lwIP (netconn) causes RAM overflow at high data rates

  • May 16, 2025
  • 1 reply
  • 517 views

Hi everyone,

I'm working on implementing a UDP communication between my STM32H755 (Nucleo-144) and a PC, where the microcontroller acts as a UDP client. I'm using lwIP with the netconn API and FreeRTOS is already running with several tasks (that's the only reason why I went directly for netconn API instead of RAW API).

The communication works fine when I use osDelay(100) in the data transmission task, but if I try to increase the transmission frequency (e.g., osDelay(10)), I start running into RAM overflow issues.

I've placed the lwIP sections in D2 SRAM like this in the -FLASH.ld code:

.lwip_sec (NOLOAD) :
{
. = ABSOLUTE(0x30000000);
*(.Rx_PoolSection)

. = ABSOLUTE(0x30040000);
*(.RxDecripSection)

. = ABSOLUTE(0x30040060);
*(.TxDecripSection)
} >RAM_D2

I also set PBUF_POOL_SIZE = 128, but increasing this value doesn't solve the issue.

Is there a better way to optimize memory handling with netconn at high data rates? 

Any insights or suggestions would be greatly appreciated.
Thanks in advance!

 

    This topic has been closed for replies.

    1 reply

    ST Employee
    May 26, 2025

    Hello @anna1,

    Thank you for your report.

    Have you tried using this memory configuration?

    ASEHST_1-1748267795064.png

     

    With regards,