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
pull/1/head
Marcio Teixeira 7 years ago
committed by Scott Lahteine
parent
commit
75037493fa
  1. 22
      Marlin/src/inc/SanityCheck.h
  2. 1
      Marlin/src/module/stepper_indirection.cpp

22
Marlin/src/inc/SanityCheck.h

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

1
Marlin/src/module/stepper_indirection.cpp

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

Loading…
Cancel
Save