Skip to content

Commit

Permalink
Increase SCURVE cycle count for unoptimized cortex-m0
Browse files Browse the repository at this point in the history
Cortex-M0 doesn't have 32bitx32bit=64bit multiplication instructions
and can not use optimized path.

Increasing to actual cycle count of 500 to hopefully improve
stability of board as well as a form of documentation that people
should consider disabling SCURVE feqature until the code is optimized
for cortex-m0;
  • Loading branch information
cbagwell committed Nov 3, 2022
1 parent cd7fa1f commit 33f9397
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Marlin/src/module/stepper.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,11 @@

// S curve interpolation adds 40 cycles
#if ENABLED(S_CURVE_ACCELERATION)
#define ISR_S_CURVE_CYCLES 40UL
#if defined(STM32G0B1xx)
#define ISR_S_CURVE_CYCLES 500UL
#else
#define ISR_S_CURVE_CYCLES 40UL
#endif
#else
#define ISR_S_CURVE_CYCLES 0UL
#endif
Expand Down

0 comments on commit 33f9397

Please sign in to comment.