tmc2209: Set SENDDELAY=2 to avoid uart rx/tx errors

It looks like the tmc2209 chips have increased uart errors with the
default SENDDELAY of zero.  Increasing the SENDDELAY to two seems to
work around this issue.

Reported by @ReXT3D.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2021-07-20 15:19:36 -04:00
parent 121052ad39
commit b4fec8502c
1 changed files with 3 additions and 0 deletions

View File

@ -59,6 +59,9 @@ class TMC2209:
self.fields = tmc.FieldHelper(Fields, tmc2208.SignedFields, self.fields = tmc.FieldHelper(Fields, tmc2208.SignedFields,
FieldFormatters) FieldFormatters)
self.mcu_tmc = tmc_uart.MCU_TMC_uart(config, Registers, self.fields, 3) self.mcu_tmc = tmc_uart.MCU_TMC_uart(config, Registers, self.fields, 3)
# Setup fields for UART
self.fields.set_field("pdn_disable", True)
self.fields.set_field("SENDDELAY", 2) # Avoid tx errors on shared uart
# Allow virtual pins to be created # Allow virtual pins to be created
tmc.TMCVirtualPinHelper(config, self.mcu_tmc) tmc.TMCVirtualPinHelper(config, self.mcu_tmc)
# Register commands # Register commands