tmc: Enable sg_angle_offset for smooth switching from Stealthchop to Spreadcycle (#6123)

Signed-off-by: Alan.Ma from BigTreeTech <tech@biqu3d.com>
This commit is contained in:
BIGTREETECH 2023-03-28 09:18:06 +08:00 committed by GitHub
parent 1a2033aba8
commit 346e3901f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View File

@ -3410,6 +3410,7 @@ run_current:
#driver_SEDN: 0 #driver_SEDN: 0
#driver_SEIMIN: 0 #driver_SEIMIN: 0
#driver_SFILT: 0 #driver_SFILT: 0
#driver_SG4_ANGLE_OFFSET: 1
# Set the given register during the configuration of the TMC2240 # Set the given register during the configuration of the TMC2240
# chip. This may be used to set custom motor parameters. The # chip. This may be used to set custom motor parameters. The
# defaults for each parameter are next to the parameter name in the # defaults for each parameter are next to the parameter name in the

View File

@ -394,6 +394,8 @@ class TMC2240:
set_config_field(config, "pwm_lim", 12) set_config_field(config, "pwm_lim", 12)
# TPOWERDOWN # TPOWERDOWN
set_config_field(config, "tpowerdown", 10) set_config_field(config, "tpowerdown", 10)
# SG4_THRS
set_config_field(config, "sg4_angle_offset", 1)
def load_config_prefix(config): def load_config_prefix(config):
return TMC2240(config) return TMC2240(config)