Problems connecting LSM6DS3 to Xiao Ble on SPI

PJ_Glasso
Thu, 02 Apr 2026 03:15:55 +0000

Hi there,

So Thanks for the update that actually tells us quite a lot.

Since:

the IMU works with the Adafruit library

the ADS1220 + IMU work together with the Adafruit library

and your modified Adafruit version now appears to give you the register access you needed

then the hardware side is probably fine, and this is looking more like a library behavior difference on SPI rather than a wiring issue.

So yes, your modified Adafruit library may solve the immediate problem.

That said, I would still treat it as a workaround, not the final explanation.
the Adafruit library working proves the hardware and shared bus concept are basically sound.
So the better long-term answer is to figure out why the other library fails on this setup, not just patch around it.
Why I’d be cautious about editing the library:

future library updates become painful

local patches are easy to lose

the real bug stays hidden

if the failure is actually SPI transaction handling / CS timing / bus state, that problem may come back later in a different form

What I suspect is really happening:

1. Adafruit’s driver is simply handling SPI more robustly
likely better transaction wrapping, CS timing, or register access sequencing.

2. The other library may not like this shared-bus environment
even though it claims SPI support. SparkFun’s library does support SPI in concept, but that does not guarantee it behaves well with another active SPI device and another library on the same bus

So I think your current path is reasonable:

continue testing the modified Adafruit library

confirm it is stable over time

but keep in mind that the deeper issue is probably still a library SPI handling difference

If your modified Adafruit version proves stable, that may be the most practical solution. I just would not conclude from this that the other libraries are “impossible” on SPI, more likely they are just less happy with this particular shared-bus setup.

Great stuff, keep going.

HTH
GL PJ