cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to dinamically change the threshold for the FSM?

DGiov.1
Associate III

Hello,

I'm working on a ultra low power application using the LSM6DSO32X. The goal is to have a device that reacts (with a short radio message) when its orientation relative to gravity changes. For this I wish to use as much as possible the FSM and the MLC to wake up the MCU only when it is really required.

I'm working with the STEVAL-MKI109V3 in conjunction with UNICO to produce the FSM/MLC configurations, once the basic configuration works, it will be ported to the final architecture.

This was to give an overview. Now the device works as expected with a fixed threshold, however, in the final product, the threshold is supposed to be dynamically adjusted at runtime in the range [-1g; 1g]. Is it possible to do it just by writing the new value into the advanced features dedicated page? Is there any specific procedure to follow?

Thanks,

Davide.

1 ACCEPTED SOLUTION

Accepted Solutions
DGiov.1
Associate III

Hi Niccolò,

it is not a smartphone nor similar device, there is no be portait/landscape orientation so any angle is possible, I don't think 6D orientation is a viable way. Moreover, holding N different configuration for all possible orientations is not feasable.

Anyway I managed to 'find' where all the thresholds are in the Unico configuration, then at runtime I can calculate the new thresholds, write them in place of those written by Unico GUI and re-apply the whole Unico configuration. It seems to work.

View solution in original post

3 REPLIES 3
niccolò
ST Employee

Hi Davide @Davide G_Oiovanelli​ ,

it is not possible to change the threshold dynamically, you should turn back to Unico for that.

you can create different configurations depending on different thresholds, and embed them in your firmware statically, then, when you want to change the threshold you can load the corresponding configuration file.

another approach could be using the wake up or 6D orientation interrupts.

hope this helps

Niccolò

DGiov.1
Associate III

Hi Niccolò,

it is not a smartphone nor similar device, there is no be portait/landscape orientation so any angle is possible, I don't think 6D orientation is a viable way. Moreover, holding N different configuration for all possible orientations is not feasable.

Anyway I managed to 'find' where all the thresholds are in the Unico configuration, then at runtime I can calculate the new thresholds, write them in place of those written by Unico GUI and re-apply the whole Unico configuration. It seems to work.

I'm glad to hear you found a solution =)

keep up the good work!

Niccolò