Skip to content

Commit

Permalink
🐛 Fix TMC5160 + Input Shaping overcurrent (MarlinFirmware#25050)
Browse files Browse the repository at this point in the history
  • Loading branch information
tombrazier authored and thinkyhead committed Dec 16, 2022
1 parent c3090bd commit df2a248
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Marlin/src/module/stepper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1679,12 +1679,14 @@ void Stepper::pulse_phase_isr() {
// the TMC2208 / TMC2225 shutdown bug (#16076), add a half step hysteresis
// in each direction. This results in the position being off by half an
// average half step during travel but correct at the end of each segment.
#if AXIS_DRIVER_TYPE_X(TMC2208) || AXIS_DRIVER_TYPE_X(TMC2208_STANDALONE)
#if AXIS_DRIVER_TYPE_X(TMC2208) || AXIS_DRIVER_TYPE_X(TMC2208_STANDALONE) || \
AXIS_DRIVER_TYPE_X(TMC5160) || AXIS_DRIVER_TYPE_X(TMC5160_STANDALONE)
#define HYSTERESIS_X 64
#else
#define HYSTERESIS_X 0
#endif
#if AXIS_DRIVER_TYPE_Y(TMC2208) || AXIS_DRIVER_TYPE_Y(TMC2208_STANDALONE)
#if AXIS_DRIVER_TYPE_Y(TMC2208) || AXIS_DRIVER_TYPE_Y(TMC2208_STANDALONE) || \
AXIS_DRIVER_TYPE_Y(TMC5160) || AXIS_DRIVER_TYPE_Y(TMC5160_STANDALONE)
#define HYSTERESIS_Y 64
#else
#define HYSTERESIS_Y 0
Expand Down

0 comments on commit df2a248

Please sign in to comment.