2018-10-30 08:15 PM
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!
2018-10-31 03:32 AM
Can you share your sensor configuration?
2018-10-31 09:34 AM
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!
2018-11-02 02:41 AM
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.
2018-11-02 10:29 AM
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.
2018-11-05 12:49 AM
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.
2018-11-05 09:11 AM
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.