TMC2130 dual-stepper Sensorless Homing (#13061)
This commit is contained in:
parent
f6edd2c472
commit
c3cb449990
5 changed files with 41 additions and 5 deletions
|
|
@ -71,9 +71,15 @@
|
|||
fr_mm_s = MIN(homing_feedrate(X_AXIS), homing_feedrate(Y_AXIS)) * SQRT(sq(mlratio) + 1.0);
|
||||
|
||||
#if ENABLED(SENSORLESS_HOMING)
|
||||
sensorless_t stealth_states { false, false, false };
|
||||
sensorless_t stealth_states { false, false, false, false, false, false, false };
|
||||
stealth_states.x = tmc_enable_stallguard(stepperX);
|
||||
stealth_states.y = tmc_enable_stallguard(stepperY);
|
||||
#if AXIS_HAS_STALLGUARD(X2)
|
||||
stealth_states.x2 = tmc_enable_stallguard(stepperX2);
|
||||
#endif
|
||||
#if AXIS_HAS_STALLGUARD(Y2)
|
||||
stealth_states.y2 = tmc_enable_stallguard(stepperY2);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
do_blocking_move_to_xy(1.5 * mlx * x_axis_home_dir, 1.5 * mly * home_dir(Y_AXIS), fr_mm_s);
|
||||
|
|
@ -85,6 +91,12 @@
|
|||
#if ENABLED(SENSORLESS_HOMING)
|
||||
tmc_disable_stallguard(stepperX, stealth_states.x);
|
||||
tmc_disable_stallguard(stepperY, stealth_states.y);
|
||||
#if AXIS_HAS_STALLGUARD(X2)
|
||||
tmc_disable_stallguard(stepperX2, stealth_states.x2);
|
||||
#endif
|
||||
#if AXIS_HAS_STALLGUARD(Y2)
|
||||
tmc_disable_stallguard(stepperY2, stealth_states.y2);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue