Quellcode durchsuchen

Default active low for TMC2130 DIAG1 (#10294)

- Added sanity check to inform users to set the endstop to inverting
  when using SENSORLESS_HOMING
Marcio Teixeira vor 6 Jahren
Ursprung
Commit
75037493fa
2 geänderte Dateien mit 16 neuen und 7 gelöschten Zeilen
  1. 16
    6
      Marlin/src/inc/SanityCheck.h
  2. 0
    1
      Marlin/src/module/stepper_indirection.cpp

+ 16
- 6
Marlin/src/inc/SanityCheck.h Datei anzeigen

@@ -1457,12 +1457,22 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE,
1457 1457
     #error "E4_CS_PIN is required for E4_IS_TMC2130. Define E4_CS_PIN in Configuration_adv.h."
1458 1458
   #endif
1459 1459
 
1460
-  // Require STEALTHCHOP for SENSORLESS_HOMING on DELTA as the transition from spreadCycle to stealthChop
1461
-  // is necessary in order to reset the stallGuard indication between the initial movement of all three
1462
-  // towers to +Z and the individual homing of each tower. This restriction can be removed once a means of
1463
-  // clearing the stallGuard activated status is found.
1464
-  #if ENABLED(SENSORLESS_HOMING) && ENABLED(DELTA) && !ENABLED(STEALTHCHOP)
1465
-    #error "SENSORLESS_HOMING on DELTA currently requires STEALTHCHOP."
1460
+  #if ENABLED(SENSORLESS_HOMING)
1461
+    // Require STEALTHCHOP for SENSORLESS_HOMING on DELTA as the transition from spreadCycle to stealthChop
1462
+    // is necessary in order to reset the stallGuard indication between the initial movement of all three
1463
+    // towers to +Z and the individual homing of each tower. This restriction can be removed once a means of
1464
+    // clearing the stallGuard activated status is found.
1465
+    #if ENABLED(DELTA) && !ENABLED(STEALTHCHOP)
1466
+      #error "SENSORLESS_HOMING on DELTA currently requires STEALTHCHOP."
1467
+    #elif X_HOME_DIR == -1 && DISABLED(X_MIN_ENDSTOP_INVERTING)
1468
+      #error "SENSORLESS_HOMING requires X_MIN_ENDSTOP_INVERTING when homing to X_MIN."
1469
+    #elif X_HOME_DIR ==  1 && DISABLED(X_MAX_ENDSTOP_INVERTING)
1470
+      #error "SENSORLESS_HOMING requires X_MAX_ENDSTOP_INVERTING when homing to X_MAX."
1471
+    #elif Y_HOME_DIR == -1 && DISABLED(Y_MIN_ENDSTOP_INVERTING)
1472
+      #error "SENSORLESS_HOMING requires Y_MIN_ENDSTOP_INVERTING when homing to Y_MIN."
1473
+    #elif Y_HOME_DIR ==  1 && DISABLED(Y_MAX_ENDSTOP_INVERTING)
1474
+      #error "SENSORLESS_HOMING requires Y_MAX_ENDSTOP_INVERTING when homing to Y_MAX."
1475
+    #endif
1466 1476
   #endif
1467 1477
 
1468 1478
   // Sensorless homing is required for both combined steppers in an H-bot

+ 0
- 1
Marlin/src/module/stepper_indirection.cpp Datei anzeigen

@@ -193,7 +193,6 @@
193 193
     st.power_down_delay(128); // ~2s until driver lowers to hold current
194 194
     st.hysteresis_start(3);
195 195
     st.hysteresis_end(2);
196
-    st.diag1_active_high(1); // For sensorless homing
197 196
     #if ENABLED(STEALTHCHOP)
198 197
       st.stealth_freq(1); // f_pwm = 2/683 f_clk
199 198
       st.stealth_autoscale(1);

Laden…
Abbrechen
Speichern