aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docs/Config_Changes.md7
-rw-r--r--docs/Config_Reference.md4
-rw-r--r--klippy/stepper.py5
3 files changed, 11 insertions, 5 deletions
diff --git a/docs/Config_Changes.md b/docs/Config_Changes.md
index e91ff465..11447d4d 100644
--- a/docs/Config_Changes.md
+++ b/docs/Config_Changes.md
@@ -16,9 +16,10 @@ use the older (typically less accurate) definition, define a custom
`resistance1: 100000`, and `beta: 3950`.
20211104: The "step pulse duration" option in "make menuconfig" has
-been removed. A new `step_pulse_duration` setting in the
-[stepper config section](Config_Reference.md#stepper) should be set
-for all steppers that need a custom pulse duration.
+been removed. The default step duration for TMC drivers configured in
+UART or SPI mode is now 100ns. A new `step_pulse_duration` setting in
+the [stepper config section](Config_Reference.md#stepper) should be
+set for all steppers that need a custom pulse duration.
20211102: Several deprecated features have been removed. The stepper
`step_distance` option has been removed (deprecated on 20201222). The
diff --git a/docs/Config_Reference.md b/docs/Config_Reference.md
index 67d8d036..36302664 100644
--- a/docs/Config_Reference.md
+++ b/docs/Config_Reference.md
@@ -157,7 +157,9 @@ microsteps:
# The minimum time between the step pulse signal edge and the
# following "unstep" signal edge. This is also used to set the
# minimum time between a step pulse and a direction change signal.
-# The default is 0.000002 (which is 2us).
+# The default is 0.000000100 (100ns) for TMC steppers that are
+# configured in UART or SPI mode, and the default is 0.000002 (which
+# is 2us) for all other steppers.
endstop_pin:
# Endstop switch detection pin. If this endstop pin is on a
# different mcu than the stepper motor then it enables "multi-mcu
diff --git a/klippy/stepper.py b/klippy/stepper.py
index 2e6655ef..4a4f9ea4 100644
--- a/klippy/stepper.py
+++ b/klippy/stepper.py
@@ -14,6 +14,8 @@ class error(Exception):
# Steppers
######################################################################
+MIN_BOTH_EDGE_DURATION = 0.000000200
+
# Interface to low-level mcu and chelper code
class MCU_stepper:
def __init__(self, name, step_pin_params, dir_pin_params, step_dist,
@@ -70,7 +72,8 @@ class MCU_stepper:
self._step_pulse_duration = .000002
invert_step = self._invert_step
sbe = int(self._mcu.get_constants().get('STEPPER_BOTH_EDGE', '0'))
- if self._req_step_both_edge and sbe:
+ if (self._req_step_both_edge and sbe
+ and self._step_pulse_duration <= MIN_BOTH_EDGE_DURATION):
# Enable stepper optimized step on both edges
self._step_both_edge = True
self._step_pulse_duration = 0.