cancel
Showing results for 
Search instead for 
Did you mean: 

LSM6DSR is never setting XLDA in status reg.

Bob Paddock
Associate III


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.

 

1 ACCEPTED SOLUTION

Accepted Solutions

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.

View solution in original post

2 REPLIES 2
Federica Bossi
ST Employee

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.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

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.