Skip to content

Commit

Permalink
Increased main task stack size
Browse files Browse the repository at this point in the history
  • Loading branch information
dc42 committed Feb 11, 2025
1 parent 4c2ea49 commit 4974c4c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Platform/Tasks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ const char memPattern = (char)0xA5; // this must be the same pattern as FreeRTO
// 1. After running delta auto calibration with Move debugging enabled
// 2. We create an array of (2 * MaxAxes^2) floats when inverting the movement matrix for Core kinematics.
#if SAME70
// 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
constexpr unsigned int MainTaskStackWords = max<unsigned int>(1800, (MaxAxes * MaxAxes * 2) + 550);
// 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)
constexpr unsigned int MainTaskStackWords = max<unsigned int>(1860, (MaxAxes * MaxAxes * 2) + 610);
#else
// On other processors we use matrices of floats when doing auto calibration
// Increase minimum stack words to 1370 for WPA Enterprise support
constexpr unsigned int MainTaskStackWords = max<unsigned int>(1370, (MaxAxes * MaxAxes * 2) + 550);
// Increase minimum stack words to 1370 for WPA Enterprise support (now 1430 after increasing GCodeReplyLength)
constexpr unsigned int MainTaskStackWords = max<unsigned int>(1430, (MaxAxes * MaxAxes * 2) + 610);
#endif

static Task<MainTaskStackWords> mainTask;
Expand Down

0 comments on commit 4974c4c

Please sign in to comment.