2021-02-20 01:18 AM
Hello,
I got the lwIP raw TCP working on my H743ZI2 NUCLEO which I'm quite proud of, but it's quite slow. Now I would like to assign more memory to the stack. By default it's running with 16KB heap I think. So the first thing I did was changing the MPU settings from 16KB to 32KB. When I change MEM_SIZE in lwipopts.h to something bigger than 16000 the program crashes with a HardFault_Error(). Since I'm quite new to STMicro's MCU I simply have no clue, how to solve this problem. Can someone help me here please?
EDIT: The base address of the heap (LWIP_RAM_HEAP_POINTER) is 0x30044000, which is in D2 RAM. The base has an offset of 278,528 bytes in the RAM. Given it's total size of 288KB, there seems to be only about 16KB of space left which is already in use.
2021-02-27 11:30 AM
Amount of buffer memory is not the main issue. The HAL/Cube code for H7 is so broken that it's almost disfunctional.
https://community.st.com/s/question/0D50X0000C6eNNSSQ2/bug-fixes-stm32h7-ethernet
Just to note, in this demo, I am using 16 * 1536B = 24 KB memory for Rx buffers.