cancel
Showing results for 
Search instead for 
Did you mean: 

I have LSM6DSO sensor. I want to use fsm. In application note, I did not understand how thresh1 is calculated .

Iakgu.1
Associate III

I have LSM6DSO sensor. I want to use fsm. In application note, I did not understand how thresh1 is calculated . For example it is written that 

B7AEh (-0.480)

3C00h (1.000)

27AEh (0.030)

34CDh (0.300)

I did not understand how this conversion is done.

1 ACCEPTED SOLUTION

Accepted Solutions
Eleon BORLINI
ST Employee

Hi @Iakgu.1​ ,

As described in the AN5226 application note, the unit of measurement of the 16-bits thresholds is that of the selected signal:

  • if the LSM6DSO accelerometer signal is selected, the unit of the threshold is [g];
  • if the LSM6DSO gyroscope signal is selected, the unit of the threshold is [rad/sec];
  • if the LSM6DSO integrated gyroscope signal is selected, the unit of the threshold is [rad];
  • if the external magnetometer sensor signal is selected, the unit of the threshold is [G];
  • if the MLC filter signal is selected, the unit of the threshold is the same as that of the filtered signal (it can be [g] for the accelerometer, [rad/sec] for the gyroscope or [G] for an external magnetometer).

So, it basically depends on the selected sensor, and on the settings of that sensor.

Consider the In the example, the threshold case 3C00h (1.000) g, i.e. the wake-up threshold is 1.0 g ± 30 mg. Suppose you are using the accelerometer, configured with FS = +-2g: the calculation is the following:

3C00h (LSB) --> two's decimal conversion --> (decimal)--> times sensitivity (0.61 mg/LSB, see datasheet p. 9) --> 0.9375 g

Probably it is a little different from 1g since it is taking into account some residual offset or some margin for a more effective recognition of the threshold in that specific finite state machine example...

-Eleon

View solution in original post

1 REPLY 1
Eleon BORLINI
ST Employee

Hi @Iakgu.1​ ,

As described in the AN5226 application note, the unit of measurement of the 16-bits thresholds is that of the selected signal:

  • if the LSM6DSO accelerometer signal is selected, the unit of the threshold is [g];
  • if the LSM6DSO gyroscope signal is selected, the unit of the threshold is [rad/sec];
  • if the LSM6DSO integrated gyroscope signal is selected, the unit of the threshold is [rad];
  • if the external magnetometer sensor signal is selected, the unit of the threshold is [G];
  • if the MLC filter signal is selected, the unit of the threshold is the same as that of the filtered signal (it can be [g] for the accelerometer, [rad/sec] for the gyroscope or [G] for an external magnetometer).

So, it basically depends on the selected sensor, and on the settings of that sensor.

Consider the In the example, the threshold case 3C00h (1.000) g, i.e. the wake-up threshold is 1.0 g ± 30 mg. Suppose you are using the accelerometer, configured with FS = +-2g: the calculation is the following:

3C00h (LSB) --> two's decimal conversion --> (decimal)--> times sensitivity (0.61 mg/LSB, see datasheet p. 9) --> 0.9375 g

Probably it is a little different from 1g since it is taking into account some residual offset or some margin for a more effective recognition of the threshold in that specific finite state machine example...

-Eleon