2024-03-15 08:04 AM
Hi all,
This should be a question with a simple answer, but for some reason, I cannot find clarification. I am trying to use the Finite State Machine in the LSM6DSOX, and I have come across these examples below in this application note:
I'm confused on how to determine the THRESH1 values that are in the programs above. From what I read, the FSM uses the same linear acceleration sensitivity value as is output to the host MCU. As an example, my understanding is that I would take 3C66 (from program 2) as the number of LSBs, multiply that by the linear acceleration sensitivity value (i.e. 0.061 mg/LSB for FS = +-2g) and then that would be how you get the 1.100g that is in parenthesis. Doing the actual math with the different linear acceleration sensitivities for the different FS values, I don't find any of them equating the 1.100g.
I can't find any other information on how to convert the desired acceleration value in gs to the values provided to the FSM THRESH1 like is shown in the above image. Where might I be able to find this information?
Thank you for any help!
Solved! Go to Solution.
2024-03-19 07:41 AM
Hi @jspear ,
As written in the AN5273 the FSM works in floating point on 16bit:
For the conversion you can use Unico GUI or MEMS Studio:
In alternative, you can also use this website: https://evanw.github.io/float-toy/ :
0x3C66 is 1.1:
2024-03-19 07:41 AM
Hi @jspear ,
As written in the AN5273 the FSM works in floating point on 16bit:
For the conversion you can use Unico GUI or MEMS Studio:
In alternative, you can also use this website: https://evanw.github.io/float-toy/ :
0x3C66 is 1.1: