From a94bbf98808e94bd75ef6dcf7b2a0d8412a999d1 Mon Sep 17 00:00:00 2001 From: Timofey Titovets Date: Sat, 7 Feb 2026 23:19:03 +0100 Subject: [PATCH] tmc2240: allow enable SG4 threshold Signed-off-by: Timofey Titovets --- docs/Config_Reference.md | 5 +++-- klippy/extras/tmc2240.py | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/Config_Reference.md b/docs/Config_Reference.md index 8b17d9502..200b9de11 100644 --- a/docs/Config_Reference.md +++ b/docs/Config_Reference.md @@ -4163,6 +4163,7 @@ run_current: #driver_SEDN: 0 #driver_SEIMIN: 0 #driver_SFILT: 0 +#driver_SG4_THRS: 0 #driver_SG4_ANGLE_OFFSET: 1 #driver_SLOPE_CONTROL: 0 # Set the given register during the configuration of the TMC2240 @@ -4176,8 +4177,8 @@ run_current: # is "active low" and is thus normally prefaced with "^!". Setting # this creates a "tmc2240_stepper_x:virtual_endstop" virtual pin # which may be used as the stepper's endstop_pin. Doing this enables -# "sensorless homing". (Be sure to also set driver_SGT to an -# appropriate sensitivity value.) The default is to not enable +# "sensorless homing". (Be sure to also set driver_SGT OR driver_SG4_THRS +# to an appropriate sensitivity value.) The default is to not enable # sensorless homing. ``` diff --git a/klippy/extras/tmc2240.py b/klippy/extras/tmc2240.py index d57a93b83..2f114c2aa 100644 --- a/klippy/extras/tmc2240.py +++ b/klippy/extras/tmc2240.py @@ -411,6 +411,7 @@ class TMC2240: # TPOWERDOWN set_config_field(config, "tpowerdown", 10) # SG4_THRS + set_config_field(config, "sg4_thrs", 0) set_config_field(config, "sg4_angle_offset", 1) # DRV_CONF set_config_field(config, "slope_control", 0)