Suddenly unable to write to TMC 5160 spi

Basic Information:

Printer Model: (Used to be) Tronxy X5SA
MCU / Printerboard: BTT M8P + CB1
klippy (5).log (49.7 KB)

Describe your issue:

I just had my printer running the other day, but after hooking up an adxl345 accelerometer to the M8P through the onboard SPI pins, my TMC 5160 drivers on my x and y axes now say “Unable to write tmc spi ‘stepper_x’ register GLOBALSCALER” and shut down the printer upon use. I didn’t touch my printer.cfg file (besides including the new cfg file) and now the spi bus only works for the accelerometer (ACCELEROMETER_QUERY gets a response from the adxl345). It also says that “spi_bus:” is not valid in [tmc5160 stepper_x] even though it’s in the configuration reference on the Klipper website. Can someone help me fix this? I’m at a loss because I didn’t mess with the TMC section in my printer.cfg file

  • I see no ADXL config section in your log
  • If the ADXL is connected, does it return to working when disconnecting it?
  • Setting the shaper freqs to 0
    [input_shaper]
    shaper_freq_x = 0
    shaper_freq_y = 0
    shaper_type = mzv
    
    is not a good idea. Comment it out.

I commented out [include adxl345.cfg] to see if the steppers would work.

The ADXL345 was the problem. I disconnected it and reconnected it and the stepper drivers worked! The ADXL345 works as well and I just tuned my input shaper, yay! Software is so complex but also stupid at times. Thank you