# Suddenly unable to write to TMC 5160 spi

**URL:** <https://klipper.discourse.group/t/suddenly-unable-to-write-to-tmc-5160-spi/13772>\
**Category:** General Discussion\
**Created:** [February 3, 2024, 5:11am UTC](https://klipper.discourse.group/t/suddenly-unable-to-write-to-tmc-5160-spi/13772 "2024-02-03T05:11:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bingus720](https://avatars.discourse-cdn.com/v4/letter/b/cdc98d/32.png) [@Bingus720](https://klipper.discourse.group/u/Bingus720)\
**Post date:** [February 3, 2024, 5:11am UTC](https://klipper.discourse.group/t/suddenly-unable-to-write-to-tmc-5160-spi/13772/1 "2024-02-03T05:11:41Z")

</div>

### Basic Information:

Printer Model: (Used to be) Tronxy X5SA  
 MCU / Printerboard: BTT M8P + CB1  
[klippy (5).log](https://klipper.discourse.group/uploads/short-url/ttAyFK55NQhStUKopanC6uHsv7u.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

---

<div class="post-metadata">

**Author:** ![Sineos](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/sineos/32/18_2.png) [@Sineos](https://klipper.discourse.group/u/Sineos)\
**Post date:** [February 3, 2024, 7:13am UTC](https://klipper.discourse.group/t/suddenly-unable-to-write-to-tmc-5160-spi/13772/2 "2024-02-03T07:13:13Z")

</div>

- 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

```auto
[input_shaper]
shaper_freq_x = 0
shaper_freq_y = 0
shaper_type = mzv

```

is not a good idea. Comment it out.

---

<div class="post-metadata">

**Author:** ![Bingus720](https://avatars.discourse-cdn.com/v4/letter/b/cdc98d/32.png) [@Bingus720](https://klipper.discourse.group/u/Bingus720)\
**Post date:** [February 4, 2024, 12:59am UTC](https://klipper.discourse.group/t/suddenly-unable-to-write-to-tmc-5160-spi/13772/3 "2024-02-04T00:59:26Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/klipper/original/1X/64419bf2aac6639e6ef5cef200dcd456b0a01ac3.png) [@system](https://klipper.discourse.group/u/system)\
**Post date:** [April 4, 2024, 12:59am UTC](https://klipper.discourse.group/t/suddenly-unable-to-write-to-tmc-5160-spi/13772/4 "2024-04-04T00:59:38Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
