tmc2208: Send pdn_disable UART setup as first command to chip during init

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2021-08-05 13:53:36 -04:00
parent fa7a91a38b
commit a52a627893
1 changed files with 1 additions and 1 deletions

View File

@ -187,12 +187,12 @@ class TMC2208:
# Setup mcu communication
self.fields = tmc.FieldHelper(Fields, SignedFields, FieldFormatters)
self.mcu_tmc = tmc_uart.MCU_TMC_uart(config, Registers, self.fields)
self.fields.set_field("pdn_disable", True)
# Register commands
current_helper = tmc2130.TMCCurrentHelper(config, self.mcu_tmc)
cmdhelper = tmc.TMCCommandHelper(config, self.mcu_tmc, current_helper)
cmdhelper.setup_register_dump(ReadRegisters, self.read_translate)
# Setup basic register values
self.fields.set_field("pdn_disable", True)
self.fields.set_field("mstep_reg_select", True)
self.fields.set_field("multistep_filt", True)
mh = tmc.TMCMicrostepHelper(config, self.mcu_tmc)