AnsweredAssumed Answered

l3gd20, FIFO level

Question asked by xoroxo on Jan 16, 2015
What i am trying to do - is to synchronize all inertial sensors (accel, gyro, mag). Each of these sensors has its own FIFO buffer.
I did not encounter any problems with magnetometer and accelerometer, in contrast to l3gd20 gyroscope. The main problem is number of samples in FIFO buffer, it is never 0 (even if i read FIFO Sample number register every 2 ms, while the sample rate of the sensor is 95Hz).
My steps:
Gyroscope configuration (95 Hz sample rate, FIFO mode - stream).
When i am reading gyroscope data i read number of samples in the following way:

int sample_number;
i2cread(L3GD20_ADDR, 0x2F, &sample_number);
if (sample_number & 0x20)
     return 0;
        return (int)e_n & 0x1f + 1;

Does anyone have any suggestions regarding my issue? What is the reason that the FIFO is never empty? Thanks.