Key facts
- Brand
- STMicroelectronics
- Model
- X-CUBE-MEMS1
- Category
- Other
- Documents
- 2
- Languages
- EN
- Last added
- 2023-10-20
Start here

MotionFX sensor fusion library in X-CUBE-MEMS1 STM32Cube expansion
This document describes the MotionFX middleware library, part of the X-CUBE-MEMS1 software expansion for STM32Cube. It enables real-time sensor fusion for accelerometers, gyroscopes, and magnetometers, with features including gyroscope bias and magnetometer hard iron calibration. The library supports STM32 microcontrollers based on ARM Cortex-M0+, M3, M4, and M7 architectures. It includes sample implementations for development boards like NUCLEO-F401RE and NUCLEO-L476RG.
The library provides both 6-axis and 9-axis sensor fusion modes, with configurable parameters for sensor weighting, bias learning, and output orientation. It uses Kalman filtering to fuse sensor data and compensate for individual sensor limitations. Documentation is available in a compiled HTML file within the Documentation folder.
STMicroelectronics X-CUBE-MEMS1 specifications
| Memory Requirements | Cortex-M0+: 3.0 kB code, 0.3 kB data; Cortex-M3: 3.1 kB code, 0.3 kB data; Cortex-M4: 2.7 kB code, 0.3 kB data; Cortex-M7: 2.3 kB code, 0.3 kB data |
|---|---|
| Sample Rate Range | 25 Hz to 200 Hz |
| Default Accelerometer Threshold | 0.01 g |
| Default Gyroscope Threshold | 0.2 dps |
Source: STMicroelectronics X-CUBE-MEMS1 MotionGC Gyroscope Calibration Library User Manual
All STMicroelectronics X-CUBE-MEMS1 documents by type
Day-to-day operation, settings and troubleshooting. Start here if the product is already set up.
Questions answered in these manuals
What is the MotionGC library used for?
It provides real-time gyroscope calibration through angular zero-rate level coefficients (offset) to correct gyroscope data.
From: STMicroelectronics X-CUBE-MEMS1 MotionGC Gyroscope Calibration Library User Manual
How does the calibration process work?
The calibration process does not require sensor motion; the offset coefficient is calculated and updated when the sensor is still.
From: STMicroelectronics X-CUBE-MEMS1 MotionGC Gyroscope Calibration Library User Manual
What calibration features does the library provide?
It performs gyroscope bias calibration and magnetometer hard iron calibration.
From: MotionFX sensor fusion library in X-CUBE-MEMS1 STM32Cube expansion
What specific MEMS sensors does the MotionFX library process data from?
The library acquires and fuses data from the accelerometer, gyroscope, and magnetometer.
From: MotionFX sensor fusion library in X-CUBE-MEMS1 STM32Cube expansion
