TMC2208: periodically gets errors while homing

Hello everybody!

I have a problem after installing TMC2208 drivers with UART connection. I tried to figure it out on my own but couldn’t find a solution. I really hope for the help of the community.

Periodically, homing is interrupted by an error. Errors occur only on homing, and never during printing. They are of two types:

11:55:53 Failed to home a: Timeout during homing
11:55:58 Unable to read tmc uart 'stepper_b' register GSTAT
Once the underlying issue is corrected, use the "FIRMWARE_RESTART" command to reset the firmware, reload the config, and restart the host software.
Printer is shutdown
11:55:58 Unable to read tmc uart 'stepper_b' register GSTAT

12:07:27 Failed to home b: Timeout during homing
12:07:32 Unable to read tmc uart 'stepper_b' register IFCNT
12:07:32 Unable to read tmc uart 'stepper_b' register IFCNT
Once the underlying issue is corrected, use the "FIRMWARE_RESTART" command to reset the firmware, reload the config, and restart the host software.
Printer is shutdown

Axes can be any: stepper_a, stepper_b or stepper_c.

  1. I have tested the UART connection to the board many times.
  2. I tried to change the uart_pin of the drivers among themselves.
  3. Changed the drivers themselves in places in a board.
  4. I tried to decrease and increase the current in the settings.
  5. Tried setting stealthchop_threshold to 0 and 999999.

The only thing that helps is decreasing homing_speed to 10. In this case, errors crash much less often.

Somebody tell me what could be the problem? I’m ready to give up, re-solder the cut pins and connect the drivers without UART…

Printer: Anycubic Kossel (delta)
Board: Trigorilla 1.3
I installed the drivers according to this guide: Anycubic Kossel Klipper Trigorilla TMC Driver UART Upgrade - Lukas Pomykal

Here is a klippy.log with a couple of such errors, search by:

Timeout during homing

What does DUMP_TMC STEPPER=stepper_b return?
You can also try to reinitiallize the stepper with INIT_TMC STEPPER=<name>

Send: G28
Recv: // Klipper state: Shutdown
Recv: !! Failed to home a: Timeout during homing
Recv: ok
[...]
Send: G28
Recv: // Unable to read tmc uart 'stepper_b' register IFCNT
Recv: // Once the underlying issue is corrected, use the
Recv: // "FIRMWARE_RESTART" command to reset the firmware, reload the
Recv: // config, and restart the host software.
Recv: // Printer is shutdown
Recv: !! Unable to read tmc uart 'stepper_b' register IFCNT
Recv: ok
[...]
Send: DUMP_TMC STEPPER=stepper_b
Recv: // Unable to read tmc uart 'stepper_b' register IFCNT
Recv: // Once the underlying issue is corrected, use the
Recv: // "FIRMWARE_RESTART" command to reset the firmware, reload the
Recv: // config, and restart the host software.
Recv: // Printer is shutdown
Recv: !! Unable to read tmc uart 'stepper_b' register IFCNT
Recv: ok
[...]
Send: INIT_TMC STEPPER=stepper_b
Recv: // Unable to read tmc uart 'stepper_b' register IFCNT
Recv: // Once the underlying issue is corrected, use the
Recv: // "FIRMWARE_RESTART" command to reset the firmware, reload the
Recv: // config, and restart the host software.
Recv: // Printer is shutdown
Recv: !! Unable to read tmc uart 'stepper_b' register IFCNT
Recv: ok

FYI, there is some information on that error message at: https://www.klipper3d.org/TMC_Drivers.html#i-keep-getting-unable-to-read-tmc-uart-stepper_x-register-ifcnt-errors.

If you’re getting the error sporadically, I’d look for loose or noisy uart wiring.

-Kevin

I checked the UART connection again and, just in case, replaced the wires with others. Nothing has changed.

As a result, I was finally tired of it and I connected the drivers without UART.

I can assume that the reason may be in my Trigorilla board. Perhaps I will try to change it to another board for verification. Maybe later.

I have the same issue after an upgrade to 0.9.0. I was on 0.8.0 and it worked fine for months.

Kevin,
I am experiencing the same issue. I am running an MKS Gen L board with TMC2208 drivers. The error occurs during the home operation to 5 layers into the print. It is also firmware specific. 0.8.0 runs the TMC2208 in UART mode without issue. I have a second board that I still had old firmware on and it worked. As soon as I upgraded to 0.9.0 that board also did not work. I hope this is helpful information.

The Klipper software was recently changed to periodically check driver status (whenever the stepper motor is enabled). If Klipper can’t contact the stepper motor driver it will report an error.

I would double check that none of the UART wires are loose or frayed.

-Kevin

Excellent insight. Thank you.