Skip to main content
Associate
May 15, 2025
Solved

LSM6DSV80x SLFP game rotation vector, and timestamp to fifo

  • May 15, 2025
  • 3 replies
  • 549 views

Hi there, 

I'm trying to program LSM6DSV80x to read sensor values in -500Hz for a certain period of time and send them for process (thus no realtime process, but need timestamps).  The sensor values include xl, hg_xl, gyro, and also Game rotation vector, gravity calculated by SFLP.  According to the use case, all values will be read through FIFO.  Mostly works well but I've come up with two questions.  

- What timestamp means? Is it time of the latest FIFO entry,  or of the next FIFO entry, or irrelevant with other entries?

- for game rotation vector, I got two consequtive entries having TAG=19 in FIFO everytime,  at the same timing.  Those two entries have completely different values. With the application note and the post in this forum, I understand the FIFO  entry for game rotation vector hold only x, y, z elements and w needs to be calculated at the host side.  For example (the order is, w - which I calculate, x, y, z):

LSM6DSV80X_SFLP_GAME_ROTATION_VECTOR_TAG game_rotation_mg: 0.81 0.00 -0.09 -0.32
LSM6DSV80X_SFLP_GAME_ROTATION_VECTOR_TAG game_rotation_mg: 0.24 0.00 0.31 0.89

How can I interpret these values?

Any comments are appreciated!

Best answer by casadeib

Hi @jose365ww

 

-As for the Timestamp doubt, it represents the timestamp of the right after FIFO DATA.

-As for the game rotation vector, please refer to the AN6281 paragraph 8.6.3, in order to better understand the content of each FIFO register for both the TAG_SENSOR = 0x13. The first represents the first word in Table 90, and the second TAG 0x13 represents the secondo word in Table 91

casadeib_0-1747402128244.png

 

 

3 replies

casadeibBest answer
ST Employee
May 16, 2025

Hi @jose365ww

 

-As for the Timestamp doubt, it represents the timestamp of the right after FIFO DATA.

-As for the game rotation vector, please refer to the AN6281 paragraph 8.6.3, in order to better understand the content of each FIFO register for both the TAG_SENSOR = 0x13. The first represents the first word in Table 90, and the second TAG 0x13 represents the secondo word in Table 91

casadeib_0-1747402128244.png

 

 

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.
jose365wwAuthor
Associate
May 17, 2025

Thanks for your help, @casadeib !

I thought I read through AN6281 but missed this description.

 

Visitor II
December 20, 2025

If the game rotation vector isn’t aligned with FIFO timestamps, motion updates get choppy. I checked this while experimenting with different builds, including the super bear adventure mod apk God Mod, and the responsiveness was clearly better when the sensor timing was accurate. So yeah, FIFO timing plays a huge role in overall gameplay fluidity.