2024-10-12 06:14 AM
Hello, I am using the LSM6DSOX sensor and reading data from the FIFO, following these examples on GitHub (https://github.com/STMicroelectronics/STMems_Standard_C_drivers/blob/master/lsm6dsox_STdC/examples/lsm6dsox_fifo.c). I've set the same frequency for both the accelerometer and gyroscope, but when I read the data from the FIFO in continuous mode, the samples are not aligned. For example, I receive the first two accelerometer samples followed by one gyroscope sample, then three accelerometer samples, two gyroscope samples, and so on.
Since the frequencies are the same, shouldn't I receive one gyroscope sample and one accelerometer sample consecutively in a 1:1 ratio? Is this behavior normal? Or is it necessary to adjust the accelerometer's configuration in some way to ensure that the samples are aligned? If so, how should I do that?
Thank you!
2024-10-23 11:41 PM
Hi @Rturo ,
If you followed that example, having set the same ODR and the same Batch Data Rate for both sensors, the stored values for accelerometer and gyroscope should have the same frequency. Make sure to check the sensor configuration so that you have matching values in both cases.
Did you try changing the Watermark to 1 to see what is the behaviour in this case?