summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ports/stm32/lwip_inc/lwipopts.h9
1 files changed, 9 insertions, 0 deletions
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"