Browse Source

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 6 years ago
parent
commit
75037493fa
2 changed files with 16 additions and 7 deletions
  1. 16
    6
      Marlin/src/inc/SanityCheck.h
  2. 0
    1
      Marlin/src/module/stepper_indirection.cpp

+ 16
- 6
Marlin/src/inc/SanityCheck.h View File

1457
     #error "E4_CS_PIN is required for E4_IS_TMC2130. Define E4_CS_PIN in Configuration_adv.h."
1457
     #error "E4_CS_PIN is required for E4_IS_TMC2130. Define E4_CS_PIN in Configuration_adv.h."
1458
   #endif
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
   #endif
1476
   #endif
1467
 
1477
 
1468
   // Sensorless homing is required for both combined steppers in an H-bot
1478
   // Sensorless homing is required for both combined steppers in an H-bot

+ 0
- 1
Marlin/src/module/stepper_indirection.cpp View File

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

Loading…
Cancel
Save