Skip to content

Commit 4974c4c

Browse files
committed
Increased main task stack size
1 parent 4c2ea49 commit 4974c4c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Platform/Tasks.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,12 @@ const char memPattern = (char)0xA5; // this must be the same pattern as FreeRTO
4040
// 1. After running delta auto calibration with Move debugging enabled
4141
// 2. We create an array of (2 * MaxAxes^2) floats when inverting the movement matrix for Core kinematics.
4242
#if SAME70
43-
// On the SAME70 we use matrices of doubles when doing auto calibration, so we need 1800 words of stack even when MaxAxes is only 15
44-
constexpr unsigned int MainTaskStackWords = max<unsigned int>(1800, (MaxAxes * MaxAxes * 2) + 550);
43+
// On the SAME70 we use matrices of doubles when doing auto calibration, so we need 1800 words of stack even when MaxAxes is only 15 (now 1860 after increasing GCodeReplyLength)
44+
constexpr unsigned int MainTaskStackWords = max<unsigned int>(1860, (MaxAxes * MaxAxes * 2) + 610);
4545
#else
4646
// On other processors we use matrices of floats when doing auto calibration
47-
// Increase minimum stack words to 1370 for WPA Enterprise support
48-
constexpr unsigned int MainTaskStackWords = max<unsigned int>(1370, (MaxAxes * MaxAxes * 2) + 550);
47+
// Increase minimum stack words to 1370 for WPA Enterprise support (now 1430 after increasing GCodeReplyLength)
48+
constexpr unsigned int MainTaskStackWords = max<unsigned int>(1430, (MaxAxes * MaxAxes * 2) + 610);
4949
#endif
5050

5151
static Task<MainTaskStackWords> mainTask;

0 commit comments

Comments
 (0)