cancel
Showing results for 
Search instead for 
Did you mean: 

LSM6DSL: Why isn't the gyroscope data appearing in the FIFO?

SWood.5
Associate II

I am trying to use the FIFO to store accelerometer and gyroscope data on the LSM6DSL. While the acceleration data appears correctly in the FIFO, the gyroscope x and y axis data is only being stored as zeros. The gyroscope z axis data is being stored correctly in the FIFO, however. Additionally, when I read the gyroscope x and y axis registers directly, they appear correct. The FIFO_CRTL3 register is set to include both the acceleration and angular rate data in the FIFO without decimation. Any ideas what is happening? I have looked through the datasheet and application note extensively. Thank you!

6 REPLIES 6
Miroslav BATEK
ST Employee

Can you share your sensor configuration?

SWood.5
Associate II

The following is our sensor configuration. We also have low pass filters enabled and timestamps stored in the FIFO, so I included those register configurations too, in case they have any affect.

//Power managment

CTRL7_G = 0b0

CTRL6_C = 0b10000011

//FIFO Config

CTRL3_C = 0b01000100

MASTER_CONFIG = 0b0

WAKE_UP_DUR = 0b00010000

CTRL10_C = 0b00110100

MD1_CFG = 0b1

FIFO_CTRL5 = 0b00110100

FIFO_CTRL = 0b00111001

FIFO_CTRL2 = 0b10000000

FIFO_CTRL3 = 0b00001001

FIFO_CTRL4 = 0b00001000

INT1_CTRL = 0b11

//Gyro and Accel Config

CTRL4_c = 0b00001010

CTRL2_G = 0b01111100

CTRL8_G = 0b0

CTRL1_XL = 0b01111110

//Timestamp start

TIMESTAMP2_REG = 0xAA

Thank you very much!

Miroslav BATEK
ST Employee

Can you please set the FIFO ODR to maximum 6.66kHz in the FIFO_CTRL5 register.

if you need lower data rate in FIFO please set the decimation.

SWood.5
Associate II

I set the FIFO ODR to maximum, and set the appropriate decimation rate, but I am still getting zeros for the gyro x and y.

Miroslav BATEK
ST Employee

It is strange, can you check the content of the FIFO_PATTERN_[9:0] bits in the FIFO_STATUS3 and FIFO_STATUS4 registers, to see if there are accelerometer and gyro data.

0690X000006CJRbQAO.png

SWood.5
Associate II

I checked the FIFO pattern, and the accelerometer and gyro data are included. However, when I check the gyro x and gyro y registers directly now, I also get zeros. So there may be something wrong with the gyro configuration? My apologies for not catching that earlier.