cancel
Showing results for 
Search instead for 
Did you mean: 

ST tile box pro sampling time issue

DavidThomas
Associate III

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

5 REPLIES 5
Federica Bossi
ST Employee

Hi @DavidThomas ,

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

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

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))

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?

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

HI @Federica Bossi ,

FW gets the Timestamp when saving the data on sd card.

                                DavidThomas_0-1705082220487.png

 

I am using accel, Gyro, magneto meter, temperature, and quaternion . I configured to 100 Hz ODR. Thank you.

Federica Bossi
ST Employee

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.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.