Skip to content

Commit db72929

Browse files
committed
Increase main task stack size of Arduino AVR with USBCON
1 parent c7774f1 commit db72929

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Scheduler.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,11 @@ class SchedulerClass {
122122
#elif defined(ARDUINO_ARCH_AVR)
123123
/** Default stack size. Stack max dynamically checked against heap end. */
124124
static const size_t DEFAULT_STACK_SIZE = 128;
125+
#if defined(USBCON)
126+
static const size_t DEFAULT_MAIN_STACK_SIZE = 320;
127+
#else
125128
static const size_t DEFAULT_MAIN_STACK_SIZE = 256;
126-
129+
#endif
127130
#elif defined(ARDUINO_ARCH_SAM)
128131
/** Default stack size and stack max. */
129132
static const size_t DEFAULT_STACK_SIZE = 1024;

0 commit comments

Comments
 (0)