Advertisement

Quick Links

Getting started with X-LINUX-MEMS1 package for developing MEMS
Introduction
The
X-LINUX-MEMS1
is an STM32MPU OpenSTLinux software expansion package for the
used to demonstrate sensor fusion (STM32_MotionFX_Library) running on the Cortex® M4, and sensor data logging application
running on the Cortex® A7, of the STM32MP1.
The
X-LINUX-MEMS1
software package is used with
header of the STM32MP1 DK2 board. The motion FX library running on the Cortex® M4 uses MEMS sensors data
(ISM330DHCX: accelerometer and gyroscope. IIS2MDC: magnetometer) and sends data over
messaging) to the Cortex® A7.
The firmware running on the Cortex® M4 is based on an
UM3148 - Rev 2 - June 2023
For further information contact your local STMicroelectronics sales office.
X-STM32MP-MSP01
X-CUBE-MEMS1
Figure 1.
X-LINUX software architecture diagram
Applications on Linux
STM32MP157F-DK2
multi-sensor board connected to a 40-pin GPIO
RPMsg
(remote processor
package.
UM3148
User manual
discovery kit,
www.st.com

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Questions and answers

Summary of Contents for ST X-LINUX-MEMS1

  • Page 1: Figure 1. X-Linux Software Architecture Diagram

    UM3148 User manual Getting started with X-LINUX-MEMS1 package for developing MEMS Applications on Linux Introduction X-LINUX-MEMS1 is an STM32MPU OpenSTLinux software expansion package for the STM32MP157F-DK2 discovery kit, used to demonstrate sensor fusion (STM32_MotionFX_Library) running on the Cortex® M4, and sensor data logging application running on the Cortex®...
  • Page 2: Linux-Mems1 Overview

    UM3148 X-LINUX-MEMS1 overview X-LINUX-MEMS1 overview X-LINUX-MEMS1 software provides a user space application running on STM32MP157F-DK2 for the STM32MP-MSP01 expansion board with multiple motion sensors. The X-LINUX-MEMS1 software package is composed of 3 modules: Data logger (C firmware running on Cortex® M4) containing firmware drivers for accelerometer, gyroscope and magnetometer.
  • Page 3: Software Package Structure

    UM3148 Software package structure Software package structure The folder structure of the software package is below: Figure 3. Release package structure Top Level Figure 4. Folder content overview 1.3.1 Cortex® M4 firmware Cortex® M4 is firmware for MEMS data reading over I²C. The application is built for the below MEMS sensors: ISM330DHCX: 3-axis accelerometer and 3-axis gyroscope.
  • Page 4: Cortex® A7 Application

    UM3148 Software package structure 1.3.2 Cortex® A7 application RPMsg is a console C application based on the RPMsg framework used to receive the data from the Cortex® M4 at regular intervals. A high level application (QT, GTK or Python) can be made on top of this data, as shown below, and is sent at regular intervals.
  • Page 5: Hardware Setup

    UM3148 Hardware setup Hardware setup The X-LINUX-MEMS1 software works with the X-STM32MP-MSP01 board, which is plugged on the 40-pin GPIO connector present on the STM32MP157F-DK2 platform. Figure 7. X-STM32MP-MSP01 expansion board Figure 8. X-STM32MP-MSP01 expansion board on STM32MP1 board UM3148 - Rev 2...
  • Page 6: Software Setup

    Downloading and running the package This is required to build the X-LINUX-MEMS1 Yocto recipe for the distribution package and for creating the STM32MP1 SD card flashable images, which has the MEMS application (elf, rpmsg, Python ) embedded. The developer can follow the given link to download the...
  • Page 7: Building The Application

    $tar xvf X-LINUX-MEMS1_V1.0.0.tar.xz You get the X-LINUX-MEMS1_V1.0.0 folder as shown in Figure 4. Folder content overview. Cortex® M4 firmware The firmware workspace is built using STM32CubeIDE: Figure 9. X-LINUX-MEMS1 Cortex® M4 folder structure UM3148 - Rev 2 page 7/15...
  • Page 8: Cortex® A7 Application

    Makefile and the rpmsg source are present at: X-LINUX-MEMS1_V1.0.0\Application\Source\X-LINUX- MEMS1\Utilities\C\rpmsg. Distribution package This is required to build the Yocto recipes and create STM32MP1 images which has x-linux-mems1 application embedded in them. Step 1. Create a directory for the distribution package and initialize repo in the current directory PC $>...
  • Page 9: Running The Application

    Step 4. Add meta-st-mems1 layer PC $> bitbake-layers add-layer ../layers/meta-st/meta-st-mems1 Step 5. Update the configuration to add new components in the image PC $> echo 'IMAGE_INSTALL:append = "mems1"' >> ../layers/meta-st/meta-st-openstlinux /conf/layer.conf PC $>vi ../layers/meta-st/meta-st-openstlinux/conf/layer.conf IMAGE_INSTALL: append = "mems1" Step 6.
  • Page 10: Distribution Package

    UM3148 Running the application Figure 11. Running Python GUI Figure 12. Sensor.py Python GUI 4.5.3 Distribution package Once flashed using STM32CubeProgrammer, these files (.elf, rpmsg, sensor.py) can be found at the '/lib/firmware' location. UM3148 - Rev 2 page 10/15...
  • Page 11: Revision History

    UM3148 Revision history Table 1. Document revision history Date Revision Changes 05-May-2023 Initial release. 08-Jun-2023 Watermark has been removed. UM3148 - Rev 2 page 11/15...
  • Page 12: Table Of Contents

    X-LINUX-MEMS1 overview ........
  • Page 13 UM3148 List of tables List of tables Table 1. Document revision history ............. 11 UM3148 - Rev 2 page 13/15...
  • Page 14 X-LINUX-MEMS1 Cortex® M4 folder structure ........
  • 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