Skip to main content
Explorer
January 11, 2024
Question

ST tile box pro sampling time issue

  • January 11, 2024
  • 2 replies
  • 1426 views

Hi all , 

               I have stored IMU quaternion data into the SD card. I did use the Algo builder tool for that. I couldn't get the samples in configured 100Hz. Kindly help to store all samples in 100hz rate.

sampling time issue.png

    This topic has been closed for replies.

    2 replies

    Technical Moderator
    January 11, 2024

    Hi @DavidThomas ,

    We have never seen something like that. How are you calculating and plotting the ODR?

    Explorer
    January 12, 2024

    HI @Federica Bossi  , I am calculating the ODR like below.

                         step1: Finding the difference between two time stamps from the log.

                         step2: Finding the ODR from that time difference.

     example:

                          sampling time stamp diff = sample2 time stamp - sample 1 time stamp

                          Sampling rate = (1/ (sampling time stamp diff / 1000000))

    Technical Moderator
    January 12, 2024

    Hi @DavidThomas ,

     

    Does the fw get the timestamp when saving the data on sd card or when reading the data from the sensor?

    In the first case, there may be timing issues with the code generated by algobuilder, I would suggest to check the data ODR via an oscilloscope. and calculate the timestamp based on that.

    In the second case, what sensor and what ODR are you using?

    Technical Moderator
    February 1, 2024

    Hi @DavidThomas ,

    You are reading the sensor hub timestamp, so I'm not sure this is the real timing of the data you are reading.

    Please, read register FUNCTIONS_ENABLE (50h), to check if the timestamp is enabled and if so, try to manually read the timestamp register TIMESTAMP0 (40h), TIMESTAMP1 (41h), TIMESTAMP2 (42h), and TIMESTAMP3 (43h) to check if it is the one you are reading.

    Also, read register INTERNAL_FREQ_FINE (4Fh) and calculate the real ODR.