Skip to main content
Visitor II
August 10, 2020
Question

Custom algorithms using finite state machine (FSM) on LSM6DSO sensor.

  • August 10, 2020
  • 2 replies
  • 1033 views

Hello, there,

I would like to know about the application of FSM feature of LSM6DSO sensor.

I can see in the example that every embedded functions are implemented using FSM.

Link: https://github.com/STMicroelectronics/STMems_Standard_C_drivers/blob/master/lsm6dso_STdC/example/lsm6dso_fsm.c

We have developed three algorithm and looking at implementing via state machine diagram.

Can FSM be used for our custom algorithms?

Does FSM only supports sensor's internal features such as 4D, Free Fall, Wrist-tilt, Basic Pedometer, Motion and so on?

Kind regards,

Aakash Soni.

    This topic has been closed for replies.

    2 replies

    ST Employee
    August 12, 2020

    Hi Aakash @ASoni.2​,

    yes, FSM can indeed be used for your custom algorithms.

    you can read the application note below to learn how to program it:

    https://www.st.com/resource/en/application_note/dm00537590-lsm6dso-finite-state-machine-stmicroelectronics.pdf

    what algorithm are you planning to implement?

    ASoni.2Author
    Visitor II
    August 12, 2020

    Hi Niccolo @niccolo.ruffini​ 

    Thank you for your reply.

    We are developing a smartwatch.

    We have fall detection and sleep monitoring algorithms as well as small features such as step counting and wrist tilting.

    We might also use accelerometer for PPG sensor.

    Kind regards,

    Aakash Soni.

    ST Employee
    August 13, 2020

    That is really cool.

    As you can see, there is a version of a wrist tilting algorithm in the sample code at the link you posted, for the other ones you should try and program it using the application note I linked.

    keep up the good work!