cancel
Showing results for 
Search instead for 
Did you mean: 

l3gd20, FIFO level

sir
Associate
Posted on January 16, 2015 at 13:28

Hello.

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;

else 

        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.
0 REPLIES 0