Browse Source

Disable spreadcycle in tmc_enable_stallguard<2209> (#16890)

Karl Andersson 4 years ago
parent
commit
f30897500d
No account linked to committer's email address
1 changed files with 4 additions and 1 deletions
  1. 4
    1
      Marlin/src/feature/tmc_util.cpp

+ 4
- 1
Marlin/src/feature/tmc_util.cpp View File

@@ -1096,8 +1096,11 @@
1096 1096
   }
1097 1097
 
1098 1098
   bool tmc_enable_stallguard(TMC2209Stepper &st) {
1099
+    const bool stealthchop_was_enabled = !st.en_spreadCycle();
1100
+    
1099 1101
     st.TCOOLTHRS(0xFFFFF);
1100
-    return !st.en_spreadCycle();
1102
+    st.en_spreadCycle(false);
1103
+    return stealthchop_was_enabled;
1101 1104
   }
1102 1105
   void tmc_disable_stallguard(TMC2209Stepper &st, const bool restore_stealth) {
1103 1106
     st.en_spreadCycle(!restore_stealth);

Loading…
Cancel
Save