ST X-CUBE-MEMS1 Getting Started
Hide thumbs Also See for X-CUBE-MEMS1:

Advertisement

Quick Links

UM2722
User manual
Getting started with MotionAD airplane detection library in X-CUBE-MEMS1
expansion for STM32Cube
Introduction
The MotionAD is a middleware library part of
X-CUBE-MEMS1
software and runs on STM32. It provides real-time information
about airplane mode detection based on data from a hand-held device.
The library is able to detect airplane mode from hand-held devices (mobile phone, laptop, tablet) to automatically avoid potential
hazards such as interference with wireless communication and battery explosion due to high current drawn by the airplane
outlet.
This library is intended to work with ST MEMS only.
The algorithm is provided in static library format and is designed to be used on STM32 microcontrollers based on the ARM®
Cortex®-M3, ARM® Cortex®-M33, ARM® Cortex®-M4 or ARM® Cortex®-M7 architecture.
It is built on top of
STM32Cube
software technology that eases portability across different STM32 microcontrollers.
The software comes with sample implementation running on an
X-NUCLEO-IKS01A3
or
X-NUCLEO-IKS4A1
expansion board
plugged on a NUCLEO-F401RE,
NUCLEO-L152RE
or
NUCLEO-U575ZI-Q
development board.
UM2722 - Rev 2 - March 2024
www.st.com
For further information contact your local STMicroelectronics sales office.

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the X-CUBE-MEMS1 and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for ST X-CUBE-MEMS1

  • Page 1 UM2722 User manual Getting started with MotionAD airplane detection library in X-CUBE-MEMS1 expansion for STM32Cube Introduction The MotionAD is a middleware library part of X-CUBE-MEMS1 software and runs on STM32. It provides real-time information about airplane mode detection based on data from a hand-held device.
  • Page 2: Acronyms And Abbreviations

    UM2722 Acronyms and abbreviations Acronyms and abbreviations Table 1. List of acronyms Acronym Description Application programming interface Board support package Graphical user interface Hardware abstraction layer Integrated development environment UM2722 - Rev 2 page 2/15...
  • Page 3: Motionad Middleware Library For X-Cube-Mems1 Software Expansion For Stm32Cube

    The library is designed for ST MEMS only. Functionality and performance when using other MEMS sensors are not analyzed and can be significantly different from documented behavior.
  • Page 4: Motionad Apis

    UM2722 MotionAD middleware library for X-CUBE-MEMS1 software expansion for STM32Cube 2.2.2 MotionAD APIs The MotionAD library APIs are: • uint8_t MotionAD_GetLibVersion(char *version) – retrieves the library version – *version is a pointer to an array of 35 characters – returns the number of characters in the version string •...
  • Page 5: Api Flow Chart

    UM2722 MotionAD middleware library for X-CUBE-MEMS1 software expansion for STM32Cube 2.2.3 API flow chart Figure 1. MotionAD API logic sequence Start Initialize GetLibVersion Wait Expiring Timer/ Data Read Interrupt Read Acc, Press, Temp Data Update Get Airplane Mode Code UM2722 - Rev 2...
  • Page 6: Demo Code

    UM2722 MotionAD middleware library for X-CUBE-MEMS1 software expansion for STM32Cube 2.2.4 Demo code The following demonstration code reads data from the accelerometer, temperature and pressure sensors and detects the airplane mode code. […] #define VERSION_STR_LENG 35 #define ALGO_FREQ 100 […] /*** Initialization ***/ char lib_version[VERSION_STR_LENG];...
  • Page 7: Sample Application

    UM2722 MotionAD middleware library for X-CUBE-MEMS1 software expansion for STM32Cube Table 3. Cortex-M33 and Cortex-M7: elapsed time (µs) algorithm Cortex-M33 STM32U575ZI-Q at 160 MHz Cortex-M7 STM32F767ZI at 96 MHz Sample application The MotionAD middleware can be easily manipulated to build user applications; a sample application is provided in the Application folder.
  • Page 8: Figure 3. Mems-Studio - Library Evaluation - Data Table

    UM2722 MotionAD middleware library for X-CUBE-MEMS1 software expansion for STM32Cube Step 3. When connected to STM32 Nucleo board with supported firmware Library Evaluation tab is opened. To start and stop data streaming toggle the appropriate start / stop button on the outer vertical tool bar.
  • Page 9: Figure 5. Mems-Studio - Library Evaluation - Save To File

    UM2722 MotionAD middleware library for X-CUBE-MEMS1 software expansion for STM32Cube Step 5. Select the Save to File tab on the inner vertical tool bar to open the data logging configuration window. Select which sensor and activity data to save to log file. You can start or stop saving by clicking on the corresponding Start / Stop button.
  • Page 10: References

    References References All of the following resources are freely available on www.st.com. 1. UM1859: Getting started with the X-CUBE-MEMS1 motion MEMS and environmental sensor software expansion for STM32Cube 2. UM1724: STM32 Nucleo-64 boards (MB1136) 3. UM3233: Getting started with MEMS-Studio...
  • Page 11: Revision History

    UM2722 Revision history Table 4. Document revision history Date Version Changes 13-May-2020 Initial release. Updated Section Introduction, Section 2.1: MotionAD overview, Section 2.2.1: MotionAD library 28-Mar-2024 description, Section 2.2.2: MotionAD APIs, Section 2.2.4: Demo code, Section 2.2.5: Algorithm performance, Section 2.3: Sample application Section 2.3: Sample application.
  • Page 12: Table Of Contents

    Acronyms and abbreviations ............2 MotionAD middleware library for X-CUBE-MEMS1 software expansion for STM32Cube .
  • Page 13 UM2722 List of tables List of tables Table 1. List of acronyms ..............2 Table 2.
  • Page 14 UM2722 List of figures List of figures Figure 1. MotionAD API logic sequence ............5 Figure 2.
  • Page 15 ST’s terms and conditions of sale in place at the time of order acknowledgment. Purchasers are solely responsible for the choice, selection, and use of ST products and ST assumes no liability for application assistance or the design of purchasers’...

Table of Contents