summaryrefslogtreecommitdiff
path: root/examples/device
diff options
context:
space:
mode:
Diffstat (limited to 'examples/device')
-rw-r--r--examples/device/cdc_msc_freertos/src/main.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/examples/device/cdc_msc_freertos/src/main.c b/examples/device/cdc_msc_freertos/src/main.c
index f093d8ea0..77184ff58 100644
--- a/examples/device/cdc_msc_freertos/src/main.c
+++ b/examples/device/cdc_msc_freertos/src/main.c
@@ -56,7 +56,13 @@ StaticTimer_t blinky_tmdef;
TimerHandle_t blinky_tm;
// static task for usbd
-#define USBD_STACK_SIZE (3*configMINIMAL_STACK_SIZE/2)
+// Increase stack size when debug log is enabled
+#if CFG_TUSB_DEBUG
+ #define USBD_STACK_SIZE (3*configMINIMAL_STACK_SIZE)
+#else
+ #define USBD_STACK_SIZE (3*configMINIMAL_STACK_SIZE/2)
+#endif
+
StackType_t usb_device_stack[USBD_STACK_SIZE];
StaticTask_t usb_device_taskdef;