cancel
Showing results for 
Search instead for 
Did you mean: 

Lower than expected sampling rate for accelerometer and gyroscope in FIFO mode of LSM6DSL

A_N_
Associate

Hi,

I'm using the FIFO of the LSM6DSL IMU sensor to sample accelerometer and gyroscope values. I'm sampling the FIFO only once the watermark is true and read the FIFO as long as the number of patterns in the FIFO is not zero. I read the FIFO faster than it gets filled by setting an application timer every 50ms that empties the FIFO (if the watermark is true).

However, no matter I use the maximum SPI frequency or anything, I can never get as high of a sampling rate as expected. When the accelerometer or gyroscope are sampling at 416Hz, I get about 410 Hz actual samples. This number is different for different sensors (same hardware and firmware) and it can be 412 or 414 Hz, but never 416Hz. I lose a similar number of samples (about 1.4%) for different sampling rates.

Based on this discussion and this other, it seems this is due to the IMU's internal clock inaccuracy. So, is there nothing I can do to know how many samples I should expect? It seems each individual sensor has a particular frequency but each sensor is slightly different.

1 ACCEPTED SOLUTION

Accepted Solutions
Eleon BORLINI
ST Employee

Hi @A_N_​ ,

it is actually possible that the output data rate (ODR) is different from the nominal one.

If you need the precise ODR value, my suggestion is to characterize it by enabling the DataReady interrupt on INTx pin and to count the resulting toggling peaks.

If my reply answered your question, please click on Select as Best at the bottom of this post. This will help other users with the same issue to find the answer faster.

-Eleon

View solution in original post

3 REPLIES 3
Eleon BORLINI
ST Employee

Hi @A_N_​ ,

it is actually possible that the output data rate (ODR) is different from the nominal one.

If you need the precise ODR value, my suggestion is to characterize it by enabling the DataReady interrupt on INTx pin and to count the resulting toggling peaks.

If my reply answered your question, please click on Select as Best at the bottom of this post. This will help other users with the same issue to find the answer faster.

-Eleon

Svan .8
Associate II

Hi Eleon,

we face the problem that the output data rate (ODR) of different product batches differs significantly. Batches with the mark 940 are close to a sampling rate of 6600Hz. And Batches with the mark120 are close to 7000Hz.

Do you have any information on why the tollerances are so large?

Svan .8
Associate II

Here are some addition measurements which we have done. Hardware-setup was the same.Only the chips are changed between this measurements.

Labeled with 1200693W00000NpvD1QAJ.pngLabeled with 940

0693W00000NpvCXQAZ.png