Is LSM6DSR a drop-in replacement for LSM6DSL ?
Hi everyone,
I'm working on a project involving the LSM6DSR sensor (very similar to the LSM6DSL), connected via SPI to a Verdin i.MX8M Plus SoM (NXP) mounted on a Dahlia Carrier Board. The firmware runs on the Cortex-M7 core (MIMX8ML8DVNLZ) using Zephyr RTOS v4.1.0.
What I've done:
Integrated Zephyr’s official lsm6dsl sensor sample
Configured the sensor in the device tree (reg = <0>, spi-max-frequency = <10000000>)
Enabled CONFIG_LSM6DSL=y, CONFIG_SPI=y, CONFIG_SENSOR=y in prj.conf
The driver appears to initialize in the logs, but always ends up saying failed to initialize chip 0x0
The issue:
No SPI activity is observed on the oscilloscope.
Before firmware starts: CS is low (0V)
After Zephyr boots: CS line goes to 1.8V (expected idle state) and remains high
No toggling on CS, no SCLK or MOSI/MISO activity
What I need help with:
I’m trying to understand:
Is the LSM6DSR fully compatible with the lsm6dsl Zephyr driver in SPI mode?
Does the driver automatically try to read WHO_AM_I or other registers during init?
Could I be missing specific SPI config requirements (CPOL/CPHA, delay, pin state)?
Any suggestions, working SPI examples, or validation would be greatly appreciated. Thanks for your time!
