xbst / KUSBA

Klipper USB Accelerometer Project

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`Invalid adxl345 id (got f2 vs e5)` error running `ACCELEROMETER_QUERY` for the first time

hakimio opened this issue · comments

I understand that Invalid adxl345 id (got f2 vs e5) error is documented but instead of ignoring it, it should be fixed. This doesn't happen with FYSETC Portable Input Shaper and should not happen with KUSBA.

commented

This happens with a Raspberry Pi Pico with ADXL345 too, not just KUSBA. This is a Klipper problem and there is nothing I can do to fix it.

  • Why doesn't this happen with FYSETC Portable Input Shaper which also uses RP2040?
  • If it's Klipper bug, where is the bug report and, if you know what's causing the issue, why don't you create a PR for Klipper?

I guess you were referring to this closed bug report: Klipper3d/klipper#4712

commented

I have no idea why FYSETC PIS doesn't have this problem. Me and other people (simple discord searches can find some recent examples) had the invalid ID issue on the first query with Pi Picos too, not just KUSBA. This indicates a software issue.

One difference between the KUSBA vs PIS is, PIS uses different GPIO pins for the SPI bus to the ADXL, could be related. But the pins the KUSBA use are full HW SPI pins too, and they should work the same. Again, the only possible explanation I can think of for this is a Klipper bug, even if it is not reported on GitHub.

Can you create a bug report on Klipper repo and link it here?

I found a solution:

Use this:
[adxl345]
cs_pin: adxl:gpio1
#spi_bus: spi0a
spi_software_sclk_pin: adxl:gpio2
spi_software_mosi_pin: adxl:gpio3
spi_software_miso_pin: adxl:gpio0

commented

Ideally I prefer hardware SPI over software SPI, but I'll test it and if this fixes the issue without producing worse results I'll add it as an option to the .cfg.

Invalid adxl345 id (got f2 vs e5).
This is generally indicative of connection problems
(e.g. faulty wiring) or a faulty adxl345 chip.

how to fix ?
or use klipper version ?