From 959e910366d0109f959a1ecbb91d5fbd92b9be2f Mon Sep 17 00:00:00 2001 From: Damien George Date: Wed, 11 Jun 2025 13:31:40 +1000 Subject: [PATCH] stm32/lwip_inc: Increase lwIP memory on N6. Signed-off-by: Damien George --- ports/stm32/lwip_inc/lwipopts.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ports/stm32/lwip_inc/lwipopts.h b/ports/stm32/lwip_inc/lwipopts.h index 9e2402c8d..ad1143845 100644 --- a/ports/stm32/lwip_inc/lwipopts.h +++ b/ports/stm32/lwip_inc/lwipopts.h @@ -10,6 +10,15 @@ #define LWIP_RAND() rng_get() +// Increase memory for lwIP to get better performance. +#if defined(STM32N6) +#define MEM_SIZE (16 * 1024) +#define TCP_MSS (1460) +#define TCP_WND (8 * TCP_MSS) +#define TCP_SND_BUF (8 * TCP_MSS) +#define MEMP_NUM_TCP_SEG (32) +#endif + // Include common lwIP configuration. #include "extmod/lwip-include/lwipopts_common.h"