Problem with ADXL345 at SKR 3 SPI and CAN

I have the following setup:
bed slinger printer

  1. MCU SKR 3 EZ
  2. MCU EBB 42 v1.2
    Raspberry Pi 3B+ with MCP2515 CAN Hat (16Mhz Quartz)
    5" DSI Display
    no Wlan, no camera

MCU 1&2 are connected to the Pi via CAN (500 kbit/s, cable twisted, both sides terminated with 120 Ohm)

  1. ADXL345 (X-axis) on the EBB42
  2. ADXL345 (Y-axis) connected via hardware SPI2 to the SKR (not to the Pi !)

CanBoot is installed on both MCUs, flashing via CAN runs without errors.

ACCELEROMETER_QUERY CHIP=bed → works
ACCELEROMETER_QUERY CHIP=hotend → works as well

TEST_RESONANCES AXIS=X is executed successfully

TEST_RESONANCES AXIS=Y starts, but stops after a few Hz with Internal error on command: “TEST_RESONANCES” and Unable to obtain ‘spi_transfer_response’ response. The point at which it terminates is not always the same, sometimes at 24Hz, sometimes at 40Hz, not reproducible.

The log says “Got error -1 in can write: (105)No buffer space available”.

What I have done so far:
changed buffer size in /etc/network/interfaces.d/can0 from 128 to 1000

auto can0
iface can0 can static
bitrate 500000
up ifconfig $IFACE txqueuelen 1000

brings no improvement.

Next bitrate changed to 1Mbit/s,

auto can0
iface can0 can static
bitrate 1000000
up ifconfig $IFACE txqueuelen 1000

reinstalled CanBoot and Klipper on both MCUs

now TEST_RESONANCES AXIS=X and TEST_RESONANCES AXIS=Y works !

but now there is almost every time an error with “Communication timeout during homing z” at Z-Homing
What can be the problem here ?

klippy (5).log (2.7 MB)

Try a bitrate of 250K. The 'no buffer space" is because it can’t see/communicate the device on the bus.

I do not think that this leads to the goal because:

  1. the flashing of Klipper via CAN works without errors
  2. 250kbit/s for the ADXL is not enough according to klipper documentation.

if you look at the error counter of CAN0 after flashing with ifconfig, it is 0 !
Only when “Communication timeout during homing z” occurs, the counter increases.

@Noltec
Hi, I’m planning to buy a SHT or EBB. As far as I read around here in the forum, the SHT seems to run more reliable with Klipper.
Did you make any progress in your investigation?
Here Problem with CANBUS during print/idle - #53 by jeff3dDank jeff3dDank tries a can speed of 500000 and sets his txqueuelen to 1024 with good results. Maybe the CAN IF on the EBB side is that unstable.
Might be worth a try. Good luck.