cancel
Showing results for 
Search instead for 
Did you mean: 

LSM6DSV320 FIFO configuration

ecojocaru
Associate

Hi all,
I am trying to get started with a LSM6DSV320X accelerometer, using a STEVAL-MKI251A and a Raspberry Pi 4. I can get raw Accelerometer and Gyroscope data from their dedicated output registers (0x22h to 0x2D), but when I try to use the FIFO, I can't get it to work - I get data with tags that are not enabled, with tags that don't exist, and when there's a tag with Accelerometer data, it's incorrect. I've also tried writing the special functions registers to make sure the special functions are disabled and there's nothing of that batched into the FIFO, just to make sure, but that didn't make any change. Currently I've reduced it to as simple a configuration as possible and removed all other code from the test program, and I'm using the following configuration:

Read WHO_AM_I register - get 0x73

Configure FIFO:
Write 0x01 to CTRL3 (software reset)
Write 0x44 to CTRL3 (Enable BDU, auto-increment)
Write 0x04 to CTRL1 (Acc high performance mode, 30HZ)
Write 0x10 to FIFO_CTRL1 (watermark at 16 samples)
Write 0x00 to FIFO_CTRL2 (default, but making sure)
Write 0x04 to FIFO_CTRL3 (batch acc data at 30 hz, but not gyro data
Write 0x06 to FIFO_CTRL4 (FIFO batching continuous mode)

The SPI signals look correct on the scope. I did the writes with read-checks just to make sure the registers are written to correctly. I've confirmed that the FIFO is read in a burst  operation (1 byte for address, followed by 7 bytes read). Am I missing something in my configuration? I don't have a second devkit to test if it's a hardware issue.

Any help is appreciated!

0 REPLIES 0