tmc2240: allow enable SG4 threshold

Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
This commit is contained in:
Timofey Titovets 2026-02-07 23:19:03 +01:00
parent e8edc8be9c
commit a94bbf9880
2 changed files with 4 additions and 2 deletions

View file

@ -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.
```

View file

@ -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)