Unable to write tmc spi error after switching to 5160 drivers

Basic Information:

Printer Model: Voron 2.4R2
MCU / Printerboard: Spider 2.3
Host / SBC
klippy.log

Fill out above information and in all cases attach your klippy.log file (use zip to compress it, if too big). Pasting your printer.cfg is not needed
Be sure to check our “Knowledge Base” Category first. Most relevant items, e.g. error messages, are covered there

Describe your issue:

My Voron previously worked perfectly with 2209s, I decided to upgrade my AB steppers soon and starting with replacing the drivers. After setting the appropriate jumpers and installing the 5160s, I am now getting an Unable to write tmc spi stepper x in Globalscaler error. I have the jumpers in place according to my mcu instructions for those drivers. Also using config settings they recommend for those drivers.

Thanks in advance for any help!

klippy_1.zip (1.7 MB)

Hello @effnzack

You should mention to what steppers you upgraded here in the text too. Else the supporters have to search.

Have you checked the jumpers?

It’s not quite clear where to put them in this document (upper or lower position) :

spiderbase.cfg (15.9 KB)

I have not actually replaced the steppers yet, still using the old ones which are Voron BOM. From what I can tell it isnt a wiring or stepper issue but a config issue.

https://www.google.com/url?sa=t&source=web&rct=j&opi=89978449&url=https://kb-3d.com/store/electronics/826-ldo-voron-v24-stepper-motor-kit-7-piece-rev-d-1640807333866.html&ved=2ahUKEwjiqcfqndiFAxUxJ0QIHZgBCiYQFnoECBMQAQ&usg=AOvVaw3fKtnP-dyvHnT9J8WAL1DE

Great! You don’t have the TMC5160 in and you are wondering about the error message?

As I mentioned, the drivers were replaced from 2209s to 5160s.

Thanks,

Zack

The jumper settings seem to be ok.

I have the same problem like @EddyMI3D and don’t exactly understand what you did.

Do I get you right, you just changed the x- and y-driver to TMC5160. Now you have a mixed system with UART- and SPI-drivers?

Did you have a look here Configuration reference - Klipper documentation?

Good luck, hcet14

2 Likes

You are correct. I am planning on upgrading the AB motors so I just replaced the appropriate drivers to 5160s. I tried to explain this as best I could, please advise how I can reword it to help. Really appreciate anyone willing to assist and dont want to be confusing.

I have seen others do this, and consulted the documentation but there wasnt any information that I could find to solve my problem.

So you mean the driver configs (software). That is a difference.

You can’t set the configs in advance as long the appropriate drivers (hardware) are not installed.

When we talk about drivers, we always talk about hardware.

The other thing is the config setup.

It might be helping to post your working printer.cfg with just TMC2209 drivers and your new printer.cfg for the mixed setup.

No the 5160 drivers. The 5160 stepper drivers (hardware) are installed. I keep saying that and referencing the config file (software) as config.

From a working perfect printer to non working I did the following:

  1. Remove 2209 stepper driver hardware from X/Y location on the mcu.

  2. Install appropriate jumper pins according to Spider 2.3 diagram for 5160 stepper drivers.

  3. Install new 5160 stepper drivers for both X/Y

  4. Comment out previous 2209 settings in printer.cfg settings.

  5. Paste recomended 5160 settings in printer.cfg according to documentation found from FYSETC (attached those in this thread for reference as well)

  6. Restart firmware

  7. Attempt to Home

  8. Klipper error appears. Unable to write tmc spi stepper x to Global scaler.

Ok. So You have the drivers installed and config adapted.

Walking through your log, I noticed, that you got that issue while still running the TMC2209:

lines 33848ff

[tmc2209 stepper_x]
uart_pin = PE7
interpolate = False
run_current = .95
sense_resistor = 0.110

line 34165:

TMC stepper_x failed to init: Unable to read tmc uart 'stepper_x' register IFCNT

Next items:

Git version: 'v0.12.0-159-g2425a746-dirty'

You are running a non genuine version of Klipper


Loaded MCU 'mcu' 117 commands (v0.11.0-122-ge6ef48cd / gcc: (15:7-2018-q2-6) 7.3.1 20180622 (release) [ARM/embedded-7-branch revision 261907] binutils: (2.31.1-11+rpi1+11) 2.31.1)

the MCU ‘mcu’ runs on an older version.


Loaded MCU 'rpi' 112 commands (v0.12.0-102-g9f41f53c / gcc: (Raspbian 8.3.0-6+rpi1) 8.3.0 binutils: (GNU Binutils for Raspbian) 2.31.1)

MCU ‘rpi’ is quite up to date.

That is not used in the last part of that huge klippy.log. That’s why I asked for the two printer.cfg(s) above.

1 Like

Yes, but the issue occurred, for what reason ever.

Of course, that’s why

Guessing around is boring :wink:

I would have definitely done that from the first post if the instructions on here didnt basically tell you not to put the config here but to use the klippy log.

Here is the current config, youll notice the 2209 commented out, which were the working settings before switching.

printer.cfg (17.9 KB)

1 Like

I use Moonraker and it regulary has me update Klipper. I did have an issue a couple months back that many Voron users had with an update. It basically caused my mcu to disappear and some issues with adxl.

The workaround was I believe was using the version you are mentioning which fixed that issue. Id have to look back on the specifics.

To rule out an issue with the board, you may revert one of the axes to the previous driver.

I did that, and it just changes the error to stepper y. And back to stepper x if I swap them. It prints good with both 2209 so i think the board is fine.

2 Likes

You might try just one driver. The drivers were never tested, they are new. It happened before, that a driver is defect and disturbs the hole SPI bus.

Yes that is what I did, one of the new 5160 drivers and one of the 2209s. Then swapped the 5160 drivers and tried that.

I see others have had issues like mine, but the resolution never seems to get updated on the post whether it be on discord, reddit, etc.