2025-05-16 5:19 AM
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!