From 921d1fa6fa215af4048a4eb5e89d40ccba895449 Mon Sep 17 00:00:00 2001 From: Rob Meades Date: Fri, 30 Jun 2017 13:07:12 +0100 Subject: [PATCH] Increase PPP stack size from 512 bytes to 768 bytes. PPP is running close to the edge of its default thread stack size of 512 bytes. When it experiences an FCS error on the incoming data (for example. caused by character loss when the incoming serial rate is too high for it to process in time) it performs some additional work which overruns the thread's stack, hitting the OS "stack underflow" check. Increasing the PPP stack size to 768 bytes resolves this problem. --- features/FEATURE_LWIP/lwip-interface/lwipopts.h | 2 +- features/FEATURE_LWIP/lwip-interface/mbed_lib.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/features/FEATURE_LWIP/lwip-interface/lwipopts.h b/features/FEATURE_LWIP/lwip-interface/lwipopts.h index e0f81af5066..ebd3b612747 100644 --- a/features/FEATURE_LWIP/lwip-interface/lwipopts.h +++ b/features/FEATURE_LWIP/lwip-interface/lwipopts.h @@ -108,7 +108,7 @@ // Thread stack size for private PPP thread #ifndef MBED_CONF_LWIP_PPP_THREAD_STACKSIZE -#define MBED_CONF_LWIP_PPP_THREAD_STACKSIZE 512 +#define MBED_CONF_LWIP_PPP_THREAD_STACKSIZE 768 #endif #if LWIP_DEBUG diff --git a/features/FEATURE_LWIP/lwip-interface/mbed_lib.json b/features/FEATURE_LWIP/lwip-interface/mbed_lib.json index d330cb88865..1fbfcadf871 100644 --- a/features/FEATURE_LWIP/lwip-interface/mbed_lib.json +++ b/features/FEATURE_LWIP/lwip-interface/mbed_lib.json @@ -68,7 +68,7 @@ }, "ppp-thread-stacksize": { "help": "Thread stack size for PPP", - "value": 512 + "value": 768 } } }