Skip to main content
SWood.5
Associate II
Oct 31, 2018 3:15 AM UTC
Question

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

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!

    This topic has been closed for replies.

    6 replies

    ST Employee
    Oct 31, 2018 10:32 AM UTC

    Can you share your sensor configuration?

    SWood.5
    SWood.5Author
    Associate II
    Oct 31, 2018 4:34 PM UTC

    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!

    ST Employee
    Nov 2, 2018 9:41 AM UTC

    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
    SWood.5Author
    Associate II
    Nov 2, 2018 5:29 PM UTC

    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.

    ST Employee
    Nov 5, 2018 8:49 AM UTC

    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
    SWood.5Author
    Associate II
    Nov 5, 2018 5:11 PM UTC

    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.