From 4e3793988ad058bc2c9922bf4ae7c342c82ae3bd Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 19 May 2018 17:17:03 -0500 Subject: [PATCH] Ensure pulse delay in babystepping Proposed alternative to #10778 --- Marlin/stepper.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Marlin/stepper.cpp b/Marlin/stepper.cpp index d2ac4a84fb..33351f744f 100644 --- a/Marlin/stepper.cpp +++ b/Marlin/stepper.cpp @@ -2095,9 +2095,9 @@ void Stepper::report_positions() { #define BABYSTEP_AXIS(AXIS, INVERT, DIR) { \ const uint8_t old_dir = _READ_DIR(AXIS); \ _ENABLE(AXIS); \ - _SAVE_START; \ _APPLY_DIR(AXIS, _INVERT_DIR(AXIS)^DIR^INVERT); \ - _PULSE_WAIT; \ + DELAY_NS(400); /* DRV8825 */ \ + _SAVE_START; \ _APPLY_STEP(AXIS)(!_INVERT_STEP_PIN(AXIS), true); \ _PULSE_WAIT; \ _APPLY_STEP(AXIS)(_INVERT_STEP_PIN(AXIS), true); \ @@ -2168,6 +2168,8 @@ void Stepper::report_positions() { Y_DIR_WRITE(INVERT_Y_DIR ^ z_direction); Z_DIR_WRITE(INVERT_Z_DIR ^ z_direction); + DELAY_NS(400); // DRV8825 + _SAVE_START; X_STEP_WRITE(!INVERT_X_STEP_PIN);