2023-09-11 06:13 AM - edited 2023-09-11 06:24 AM
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.
Solved! Go to Solution.
2023-09-15 10:11 AM
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.
2023-09-15 06:59 AM
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.
2023-09-15 10:11 AM
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.