The Timestamp sensor count in the FIFO Buffer of LSM6DSR is drifting at a rate of approximately 1 minute / hour when running at an ODR of 55Hz.
Our Implementation :
We use the LSM6DSR sensor in FIFO Stream Mode (With Acc & Timestamp Enabled)
ACC ODR is set to 52Hz
ACC Batching is set to 52Hz
Timestamp decimation is set to 32
This timestamp counter is translated to real time by using the resolution factor derived from the FREQ_FINE register calculations as mentioned in the application note AN5358.
The calculation of TS Resolution is : tsResolution = (float) 1000000 / (40000 * (float) (1.0f+ 0.0015f * FREQ_FINE));
The above tsResolution factor is what we multiply to the Timestamp sensor values from the sensor FIFO buffer :
((double) acc_slot[i].timestamp / 1000000 * tsResolution)
Observation:
The calculated real world seconds elapsed is close to the calculated time for the first few minutes and then there is a slow drift observed where the calculated time starts to lag. On a long run test we observed that the error of the calculated timestamp is approximately 0.5 microseconds.
