Hello everyone!
is this drawing doable? or will i face issues? the printer connect fine with 2 adxl345 cs_pin: rpi:None, one assigned to spidev1.0 other to spidev1.1 in printer.cfg file
Hello everyone!
is this drawing doable? or will i face issues? the printer connect fine with 2 adxl345 cs_pin: rpi:None, one assigned to spidev1.0 other to spidev1.1 in printer.cfg file
Looks correct. The key is a separate CS pin for the devices. If it works, it works.
So I did the wiring, got 1 of 2 working.
Switched adxls location to see if it was defective, it was fine.
But when I switched cs0 and cs1, other one started working.
Conclusion: some wrong with spidev1.0, It couldn’t be defective could it?
help appreciated.
This is klippy log just for more informations.
Also adxl.cfg I use for easily switch on and off.
adxl.cfg (272 Bytes)
klippy.log (114.1 KB)
I’ve read a solution about creating a symlinks might work.
adxl345 raspberry pi4 multi spi
I’ll try that later.
But the issue itself is interesting, seems to affect only spidev1.0 even in raspberry pi.
It can be tricky and unfortunately, it is different between the various SBCs and some SBCs have an abysmal SPI implementation. In any case, I would rather use Armbian than the original Linux distributions (they are often really bad)
Maybe the discussion Adding several SPI slaves to one RPi SPI bus and adding several SPI buses to one RPi can give you some pointers but it is RPi related.
Tried Armbian yesterday, not sure about GUI env, but i go straight to server version since i have 8GB SD.
it’s not even server version, it just bare bones, lack of many packages including network manager.
anyway I have my hopes up for spi management, will try again after finding a solution for wifi connection.
Armbian has all on board what you need to get the basics going. Wifi connection is dead simply established with the either the commands armbian-config
or nmtui
For SPI also see Device Tree overlays - Armbian Documentation
Yep, spidev just does not work at all on armbian, plus klipper service start take’s around 5 minutes, although I loved dealing with networkd.
IoT “ minimal” OS copies apparently uses networkd, they’re fun to work with though.
Back to stock OS spidev1.0 works not spidev1.1 though.
Will connect the second adxl to printers board spi, hopefully they’ll be a solution for this in the future.
from klipper website Measuring Resonances
However, you can also connect two accelerometers simultaneously, though the ADXL345 must be connected to different boards (say, to an RPi and printer MCU board), or to two different physical SPI interfaces on the same board (rarely available). Then they can be configured in the following manner:
looks like they really meant it.
if i were to edit this c file spidev.c, and made this line
DECL_ENUMERATION_RANGE(“spi_bus”, “spidev2.0”, SPIBUS(2, 0), 16);
to this
DECL_ENUMERATION_RANGE(“spi_bus”, “spidev1.1”, SPIBUS(1, 1), 16);
will it work ?
because the issue seems to be related to CS1
Edit: the issue in CS0, my head hurts
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.