2020-12-26 02:50 PM
Is there an example for how to implement an FSM using the mbed library? I found an example FSM on GitHub that I would like to try, but I'm not sure how to implement with the mbed library. Links below.
https://os.mbed.com/teams/ST/code/HelloWorld_IKS01A3//file/f9a18e31c9d4/main.cpp/
2021-01-04 02:53 AM
Hi @CQuin.1 ,
I confirm you that the Github example uses the embedded finite state machine, but the (second) link you shared is based on the Unico procedure for the FSM configuration, and Unico works with STEVAL-MKI109V3 board.
To implement the C code that configures the I suggest you to use this other lsm6dso_fsm.c (in the lsm6dso example folder), that directly implements in C the LSM6DSO FSM registers settings.
If you are interested in using the IKS01A3 platform, you could base the general framework of your code on the previous file (that contains the platform-dependent functions for NUCLEO_F411RE + X_NUCLEO_IKS01A3 system) or the X-CUBE-MEMS1 firmware function pack: in this case you can find several examples based on the LSM6DSO device (even if not directly the FSM, for which you could use the above-suggested code (folder \Projects\STM32L476RG-Nucleo\Examples\IKS01A3).
Please let me know if these indications can help you and, in case, select this answer as best.
-Eleon