Trinamic: Split stealthChop, improve driver monitoring, etc. (#12582)

This commit is contained in:
teemuatlut
2018-12-07 23:34:21 +02:00
committed by Scott Lahteine
parent 055cb2b956
commit 50b2fbd031
77 changed files with 1671 additions and 290 deletions

View File

@ -545,11 +545,12 @@ static bool do_probe_move(const float z, const float fr_mm_s) {
// Disable stealthChop if used. Enable diag1 pin on driver.
#if ENABLED(SENSORLESS_PROBING)
sensorless_t stealth_states { false, false, false };
#if ENABLED(DELTA)
tmc_stallguard(stepperX);
tmc_stallguard(stepperY);
stealth_states.x = tmc_enable_stallguard(stepperX);
stealth_states.y = tmc_enable_stallguard(stepperY);
#endif
tmc_stallguard(stepperZ);
stealth_states.z = tmc_enable_stallguard(stepperZ);
endstops.enable(true);
#endif
@ -583,10 +584,10 @@ static bool do_probe_move(const float z, const float fr_mm_s) {
#if ENABLED(SENSORLESS_PROBING)
endstops.not_homing();
#if ENABLED(DELTA)
tmc_stallguard(stepperX, false);
tmc_stallguard(stepperY, false);
tmc_disable_stallguard(stepperX, stealth_states.x);
tmc_disable_stallguard(stepperY, stealth_states.y);
#endif
tmc_stallguard(stepperZ, false);
tmc_disable_stallguard(stepperZ, stealth_states.z);
#endif
// Retract BLTouch immediately after a probe if it was triggered