Skip to main content
Explorer
September 11, 2023
Solved

LSM6DSR is never setting XLDA in status reg.

  • September 11, 2023
  • 1 reply
  • 2268 views


I am trying to validate a new board layout and am looking for the minimal configuration to read accel data.

I'm using SPI.  When the WHO_AM_I register of the LSM6DSR is queried, the correct response of 0x6B is returned.
I take that as validation of the at least the layout and soldering.

Looking at AN5358 "Mode 1 - Reading output data" the minimum configuration is to write 0x60 to CTRL1_XL (0x10U), section 4.1. Enabling an ODR of 416 Hz at +/- 2g.

AN5358 in section 4.2 then indicates read STATUS_REG until the LSB, which is XLDA, is set.
That bit is never getting set.  Why? STATUS_REG always reads as zero.

 

    This topic has been closed for replies.
    Best answer by Bob Paddock

    Yes, I looked before asking.
    The problem turned out to be the SPI driver.  It was deasserting Chip Select to soon and the device was not being configured correctly.

    1 reply

    Technical Moderator
    September 15, 2023

    Hi @Bob Paddock ,

    Have you already looked at our examples on Github?

    If this helps you, please mark my answer as "Best Answer" by clicking on the "Accept as Solution" button, this can be helpful for Community users to find this solution faster.

    Bob PaddockAuthorAnswer
    Explorer
    September 15, 2023

    Yes, I looked before asking.
    The problem turned out to be the SPI driver.  It was deasserting Chip Select to soon and the device was not being configured correctly.