This document introduces the usage of the MotionGC library which is used to calibrate the gyroscopes on STM32.
This document describes the MotionGC middleware library, part of the X-CUBE-MEMS1 software package for STM32 microcontrollers. It provides real-time gyroscope calibration by calculating and applying angular zero-rate level coefficients (offsets) to correct sensor data. The library supports ARM Cortex-M0+, M3, M4, and M7 architectures and includes APIs for initialization, configuration, and data processing. It also provides sample code and a GUI application for demonstration and testing on compatible development boards.
The library is designed specifically for ST MEMS sensors and includes performance data for different microcontroller architectures. Calibration can be performed while the sensor is stationary, and the library supports adjustable thresholds, fast startup, and multiple sample rates from 25 Hz to 200 Hz.
| 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 |
It provides real-time gyroscope calibration through angular zero-rate level coefficients (offset) to correct gyroscope data.
The calibration process does not require sensor motion; the offset coefficient is calculated and updated when the sensor is still.
The default gyroscope threshold is 0.2 dps.