From b4fec8502c65db769535b1446db235256cf5b991 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Tue, 20 Jul 2021 15:19:36 -0400 Subject: [PATCH] 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 --- klippy/extras/tmc2209.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/klippy/extras/tmc2209.py b/klippy/extras/tmc2209.py index ceb616e9..c95ade34 100644 --- a/klippy/extras/tmc2209.py +++ b/klippy/extras/tmc2209.py @@ -59,6 +59,9 @@ class TMC2209: self.fields = tmc.FieldHelper(Fields, tmc2208.SignedFields, FieldFormatters) 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 tmc.TMCVirtualPinHelper(config, self.mcu_tmc) # Register commands