've been investigating a “timer too close” error involving MANUAL_STEPPER and noticed that it only happens for some combinations of microstepping and move lengths on the stepper.
For example, this breaks for me (and all values of MOVE larger than this)
MANUAL_STEPPER STEPPER=gear_stepper ENABLE=1 MANUAL_STEPPER STEPPER=gear_stepper SET_POSITION=0 MANUAL_STEPPER STEPPER=gear_stepper MOVE=1200 SPEED=400 ACCEL=2000
But this will work (and all values of MOVE smaller than this)
MANUAL_STEPPER STEPPER=gear_stepper ENABLE=1 MANUAL_STEPPER STEPPER=gear_stepper SET_POSITION=0 MANUAL_STEPPER STEPPER=gear_stepper MOVE=1000 SPEED=400 ACCEL=2000
As a quick workaround, I set my microstepping to 8 and no longer have the error. With interpolation enabled on the TMC2209 there is little change in noise level fortunately.
More specifically, I found that it related to the time it takes for the step generation to happen. Here’s a quick profile I tested:
240mm move Total 0.078829635997, Append 2.79170053545e-05, Generate 0.0787814059877, Finalize 2.03130039154e-05 2400mm move Total 0.520585677004, Append 2.79689993476e-05, Generate 0.520538333003, Finalize 1.93750020117e-05
I was able to generate this by adding a 1 second delay to the schedule start to avoid triggering the error
I may be willing to help implement a solution, but @koconnor I’d like your input on this issue, and how you think it could maybe be solved?