Skip to main content
HLee.4
Associate
August 1, 2022
Solved

How to calibrate the sampling rate of the LSM6DSM sensor?

hello.

I am using LSM6DSM to collect acceleration and gyro data.

Data is being collected at 52Hz using FIFO, but the actual data collected is about 51.2Hz.

It is probably caused by the LSM6DSM internal clock being inaccurate. Is there a way to correct this?

For reference, my MCU's clock is set very accurately to the external clock.

I need help. thank you

    This topic has been closed for replies.
    Eleon BORLINI
    Eleon BORLINIBest answer
    ST Employee
    August 4, 2022

    Hi @HLee.4​ ,

    unfortunately, it is not possible to fine tune the ODR at register level. The suggestion is to manage the processor-device communication through interrupts, so that the data acquisition can be synchronized.

    Please have a look also to the Github examples if they can help you in some way.

    -Eleon

    2 replies

    Eleon BORLINI
    Eleon BORLINIBest answer
    ST Employee
    August 4, 2022

    Hi @HLee.4​ ,

    unfortunately, it is not possible to fine tune the ODR at register level. The suggestion is to manage the processor-device communication through interrupts, so that the data acquisition can be synchronized.

    Please have a look also to the Github examples if they can help you in some way.

    -Eleon

    HLee.4
    HLee.4Author
    Associate
    August 8, 2022

    Thank you for answer. It helped a lot.