This repository is intended to provide information on the Finite State Machine feature available in some STMicroelectronics sensors.
Finite State Machine processing allows moving some algorithms from the application processor to the STMicroelectronics sensor, enabling consistent reduction of power consumption. The sensor can be configured to detect user-defined motion patterns.
A Finite State Machine is a mathematical abstraction used to design logic connections. It is a behavioral model composed of a finite number of states and transitions between states, similar to a flowchart in which it is possible to inspect the way logic runs when certain conditions are met. The state machine begins with a Start state, goes to different states through transitions dependent on the inputs, and finally ends in a specific state (called Stop state). The current state is determined by the past states of the system.
The results of the Finite State Machine can be read from the application processor at any time. Furthermore, there is the possibility to generate an interrupt when a user-defined motion patterns is detected.
This repository contains different folders which identify sensor part numbers supporting the Finite State Machine feature.
Each folder related to the sensor part number contains sub-folders with examples of Finite State Machine configurations. See a typical path below:
\lsm6dsox\Shake detection\
Each example sub-folder contains:
-
a
xxxxxxx.ucf
file, wherexxxxxxx
identifies the example. The.ucf
file is the standard format for Unico GUI, which allows device configuration. Unico GUI is available for: Windows, Linux, Mac OS X. -
a
xxxxxxx.h
file, wherexxxxxxx
identifies the example. This file is a C programming language header and can be generated by Unico GUI.Some examples of
xxxxxxx.h
file integration are available at platform independent drivers repository for STMicroelectronics sensors. -
README.md: additional info about the specific example.
For using C header files (.h
):
- A standard C language compiler for the target MCU
- A C library for the target MCU and the desired interface (ie. SPI, I2C)
For using Unico GUI Configuration Files (.ucf
):
- Unico GUI for device configuration
The examples can be used with:
- Unico GUI (available for: Windows, Linux, Mac OS X) and Professional MEMS Tool board (STEVAL-MKI109V3)
- Run Unico GUI selecting the desired device, then go to the Load/Save tab, and load the Unico GUI Configuration File (
.ucf
)
- Run Unico GUI selecting the desired device, then go to the Load/Save tab, and load the Unico GUI Configuration File (
- Any C-programmable hardware
- Include the C header file (
.h
) in the desired project - Use the desired interface C library for the target MCU for writing the array configuration contained in the C header file (
.h
) - Some examples of integration are available at platform independent drivers repository for STMicroelectronics sensors.
- Include the C header file (
More Information: http://www.st.com
Copyright © 2019 STMicroelectronics