cancel
Showing results for 
Search instead for 
Did you mean: 

FSM#9: How to… test your FSM – Motion detection, further algorithm examples

Eleon BORLINI
ST Employee

This example describes how to set up a finite state machine to enable the built-in detection of a Motion action. The picture here below shows the steps of the dedicated FSM. Motion FSM allows you to detect the movement of your device from a steady state to a moving state.

Input data are the axl output stream (select ODR >= 26Hz)

Mask selects as interesting orientation axis the overall resultant in positive direction v+ (0x02)

Thresholds is set to 1.1g (of the 1g gravity)

Timeout selectable (e.g. 0x7D = 5 s)

Output is an interrupt when the device is moving, while it doesn’t generate other interrupt until the device is still for 5 s

0690X000006DKCnQAO.png

Enjoy!

Link: https://www.st.com/content/ccc/resource/technical/document/application_note/group0/56/95/d6/a1/34/4c/49/6d/DM00517282/files/DM00517282.pdf/jcr:content/translations/en.DM00517282.pdf

0 REPLIES 0