User manual

Getting started with MEMS Studio

Rev 9 - February 2026
UM3233

Introduction

MEMS Studio is a complete desktop software solution designed to develop embedded AI features, evaluate embedded libraries, analyze data, and design no-code algorithms for the entire portfolio of MEMS sensors. This unique software solution offers a versatile development environment, enabling the evaluation and programming of all MEMS sensors, and launches a new generation of solutions to expand the functions of the well-established applications Unico-GUI, Unicleo-GUI, and AlgoBuilder.

MEMS Studio facilitates the process of implementing proof of concept using a graphical interface without writing code for STM32 microcontrollers. This solution allows configuring sensors and embedded AI (machine learning and neural networks), leveraging on a machine learning core (MLC), neural networks for the intelligent sensor processing unit (ISPU), and finite state machines (FSM). It reuses embedded software libraries, combines multiple functionalities in a single project, and visualizes data in real time using plot and display.

Figure 1. MEMS Studio application

Overview

MEMS Studio offers the following user experience:

  • Sensor evaluation for motion, environmental, and infrared sensors in the MEMS portfolio
  • Configuration and testing of in-sensor features such as the finite state machine (FSM), machine learning core (MLC), intelligent sensor processing unit (ISPU)
  • Runtime and offline data analysis 
  • No-code graphical design of algorithms

The key features of the application include:

  • Sensor configuration
    • Easy sensor configuration and evaluation
    • Access to the full sensor register map
    • Interrupt status monitoring
  • Sensor data analysis
    • Runtime sensor data visualization charts (line charts, bar graphs, 3D plots, …)
    • Data logging to .csv file
    • Offline data visualization, data labeling, and editing
    • Fast Fourier transform (FFT) analysis of online and offline data
    • Spectrogram analysis of online and offline data
  • Application development
    • Testing of the advanced embedded features (FIFO, pedometer, free fall, …) in the sensor
    • In-sensor AI design and programming for the finite state machine (FSM), machine learning core (MLC), and intelligent sensor processing unit (ISPU)
    • Embedded AutoML tool (automatic filter and feature selection) to simplify the MLC configuration process
    • Visualization and data logging of the output of the embedded software libraries
    • Development of no-code algorithms for data processing in STM32 microcontrollers
    • Analysis of pretrained neural network model, optimization, and conversion to c code
  • Support for Windows, macOS, and Linux operating systems
  • Network updates with automatic notification of new releases

Installation

The MEMS Studio software has been designed to operate with Microsoft Windows platforms, Linux platforms, and macOS platforms.

Windows platforms

To install MEMS Studio, launch the mems-studio.exe installation file and follow the instructions that appear on the screen. When the software is installed, you can run it from: Start > STMicroelectronics > MEMS Studio

Figure 2. MEMS Studio Installer

Linux platforms

For Linux Debian-based distributions, a .deb package is provided.

On Ubuntu, you can install the .deb package by opening a terminal and writing the following command:

sudo dpkg -i mems-studio_VERSION_amd64.deb

If the installation fails due to a missing dependent library, it is necessary to install the missing library before proceeding with the MEMS Studio installation:

sudo apt-get install <missing_library_name>
sudo dpkg -i mems-studio_VERSION_amd64.deb
After the installation has been completed, the executable file (“mems-studio”) is stored in the /usr/bin folder. To run the MEMS Studio software, just click on the MEMS Studio icon in the Application launcher menu.
Note: The current version of MEMS Studio is designed to work on Ubuntu 18.04 LTS, although it should be possible to install and run it on newer versions of Ubuntu or other Debian-based distributions after having installed all the dependencies required.

macOS platforms

To install MEMS Studio, simply open the DMG package and drag MEMS Studio to your Applications folder.

Figure 3. MEMS Studio Installer for macOS

myST Login

To use MEMS Studio, it is mandatory to enter your myST login credentials. By logging in with your myST credentials, you can fully utilize all the functionalities and services offered by MEMS Studio.

Figure 4. myST Login page

Application settings

Some application parameters can be adjusted in the Applications Settings in the Settings menu.

Application colors can be selected using Color theme. Available themes are Light, Dark, and Legacy.

Font size can be adjusted by the user in the application settings for good readability.

Plot grid in rolling mode can be set to be stationary or moving.

If Automatic registers reading is enabled, sensor registers are automatically read when entering Register map page.

The user can select the units for graphs in the application for acceleration, angular rate, magnetic field, temperature, humidity, and pressure.

Allow multiple page undocking enables the possibility to undock more than one page at a time. This option requires more computer resources.

If Automatic easy configuration is enabled, the sensor is automatically configured after connection (when the sensor is not in power-down mode). This option is valid only for ProfiMEMS firmware.

If Filter AlgoBuilder build output is enabled, AlgoBuilder automatically filters outputs from the external compiler and makes them more readable in the console.

If Notify about new firmware is enabled, the application automatically checks if new firmware for the connected board is available and offers a firmware update.

The Plot max number of samples option enables setting the maximum number of samples that will be kept in the application buffers and displayed in the line charts. This setting also impacts the amount of RAM memory allocated by the application.

Figure 5. Application Settings

External Tools

MEMS Studio utilizes some external tools. The paths to these tools need to be set in External Tools in the Settings menu.

It is necessary to specify the path to at least one compiler in order to compile AlgoBuilder firmware. IAR embedded workbench path, Keil uVision path, or STM32CubeIDE path can be specified.

Firmware programing in the standalone page or programming from the AlgoBuilder page utilizes the STM32CubeProgramer CLI tool. STM32CubeProgrammer path must be specified in order to make the programming available.

ISPU Model Converter requires that the path to the ST Edge AI Core tool needs to be specified.

The path to the Netron tool needs to be specified in order to graphically visualize the neural network.

The path to ISPU toolchain needs to be specified in order to invoke ISPU sensor configuration generation directly from MEMS Studio.

The path to Make needs to be specified in order to invoke the compiler from the ISPU IDE.

Figure 6. External Tools

Updater settings

The MEMS Studio application is able to check and notify if a new version is available. You can then decide whether to download and install the new version or not on the Updater Settings page. The network parameters have to be properly set in the Network Settings page. Both pages are in the Settings menu.

A check for a new version can be done manually by pressing the Check Now button or automatically during application startup. An interval for the automatic check can be set.

If the Download new firmware option is enabled, the application will check and download also new firmware for supported evaluation boards. The firmware package is downloaded separately and does not have any impact on the installed MEMS Studio version.

Figure 7. Updater Settings

Network Settings

For proper MEMS Studio functionality, network settings must be correctly configured.

If a proxy server is used, corresponding parameters like the HTTP address and port must be set.

If the proxy server requires authentication, user credentials must be entered in the appropriate fields.

The Check Connection button can be used to check if the settings are done correctly and the server can be reached.

Figure 8. Network Settings

Running the application for the first time

After the application startup, the Connect page is displayed. To evaluate the sensor and libraries, a compatible device with proper firmware must be connected. You can click on a particular board in the Supported Boards section to see the list of supported sensors and feature on the board or check Hardware and firmware compatibility. Features that do not require a connected device like data analysis, MLC design, AlgoBuilder, and others are available all the time.

Figure 9. Connect page

In order to connect to a board, Communication type needs to be selected. Serial, USB, and BLE interfaces are supported. The USB is used for data acquisition using High Speed Datalog firmware. The BLE interface is used only for the AlgoBuilder firmware evaluation. According to the selected communication type, Communication port, USB device or BLE device can then be selected. Communication with the device is initialized by pressing the Connect button.

After the connection is established, the firmware for the sensor evaluation allows selecting the sensor. In the case of ProfiMEMS firmware, the reference part number of DIL24 adapters or the sensor name is used for the selection. In the case of DatalogExtended firmware, sensor names are used.

Figure 10. Sensor selection - ProfiMEMS firmware
Note: As soon as the user selects the device, a validation check is performed at firmware level to verify if the selected device is the same as the connected one. The firmware checks the identifier register WHO_AM_I value in order to verify that it matches the expected value. If it does not match, an error is shown to the user.

The communication interface between the microcontroller and the sensor as well as the power supply voltages can be configured before the connection is established by clicking on the Advanced... button.

Figure 11. Advanced connection parameters
Figure 12. Sensor selection - DatalogExtended firmware

In the case of firmware that does not allow sensor selection (firmware for library evaluation, AlgoBuilder firmware, …), the list of sensors is automatically populated and selected.

Details about connected boards, sensors, and firmware are displayed in the right panel including links to all available resources like datasheets, applications notes, websites, GitHub repositories, and others.

Figure 13. Sensor and board references

Development boards with appropriate AlgoBuilder firmware can be connected over a Bluetooth interface. In the Windows operating system, the device needs to be paired first. In order to successfully detect the device in Windows 11, the Advanced Bluetooth device discovery mode needs to be selected in the Bluetooth settings.

Figure 14. Bluetooth device discovery mode (Windows 11)

The device with AlgoBuilder firmware appears as ALGOB. The pin for pairing is always 123456.

Figure 15. Device pairing

Hardware and firmware compatibility

The following tables list the combinations of hardware and firmware supported by MEMS Studio for MEMS sensor evaluation as well as those combinations that support library evaluation and the AlgoBuilder functionality.

For a complete evaluation of the sensor, the STEVAL-MKI109D or STEVAL-MKI109V3 (professional MEMS tool) evaluation platform should be used, which supports the adapter boards and sensors indicated in Table 1 Supported hardware and firmware for full sensor evaluation.

Refer to Table 2 Supported hardware and firmware with reduced sensor evaluation for the X-NUCLEO expansion boards with STM32 ODE (open development environment) used for development and form factor boards dedicated to prototyping. The sensor evaluation firmware on these boards offers configuring and testing some embedded features, such as MLC, FSM, or interrupts.

Refer to Table 3 Supported hardware for datalogging using Datalog2 (High Speed Datalog) firmware for supported boards intended for data logging using Datalog2 (High Speed Datalog) firmware.

For library evaluation, refer to Table 4 Supported hardware and firmware for library evaluation, which indicates the X-NUCLEO expansion board and supported sensor, using the firmware from the X-CUBE-MEMS1 package, however other sensors are supported if the application is generated using STM32CubeMX.

Finally, Table 5 Supported hardware and firmware with AlgoBuilder functionality provides the list of hardware platforms and development kits, used in conjunction with AlgoBuilder, that support a limited number of sensors.

Table 1. Supported hardware and firmware for full sensor evaluation
Hardware platformFirmwareSupported adapter board and sensor
STEVAL-MKI109D STEVAL-MKI109V3 (Professional MEMS tool)ProfiMEMSToolVx.y.z.bin (from MEMS Studio)STEVAL-MKI105V1 (LIS3DH) STEVAL-MKI110V1 (AIS328DQ) STEVAL-MKI125V1 (A3G4250D) STEVAL-MKI151V1 (LIS2DH12) STEVAL-MKI153V1 (H3LIS331DL) STEVAL-MKI164V1 (LIS2HH12) STEVAL-MKI165V1 (LPS25HB) STEVAL-MKI166V1 (H3LIS100DL) STEVAL-MKI167V1 (H3LIS200DL) STEVAL-MKI168V1 (IIS2DH) STEVAL-MKI169V1 (I3G4250D) STEVAL-MKI170V1 (IIS328DQ) STEVAL-MKI172V1 (LSM303AGR) STEVAL-MKI174V1 (LIS2DS12) STEVAL-MKI175V1 (LIS2DE12) STEVAL-MKI178V2 (LSM6DSL) STEVAL-MKI179V1 (LIS2DW12) STEVAL-MKI180V1 (LIS3DHH) STEVAL-MKI181V1 (LIS2MDL) STEVAL-MKI182V2 (ISM330DLC) STEVAL-MKI184V1 (ISM303DAC) STEVAL-MKI185V1 (IIS2MDC) STEVAL-MKI186V1 (IIS3DHHC) STEVAL-MKI189V1 (LSM6DSM) STEVAL-MKI190V1 (LIS2DTW12) STEVAL-MKI191V1 (IIS2DLPC) STEVAL-MKI192V1 (LPS22HH) STEVAL-MKI193V1 (ASM330LHH) STEVAL-MKI194V1 (LSM6DSR) STEVAL-MKI195V1 (LSM6DSRX) STEVAL-MKI196V1 (LSM6DSO) STEVAL-MKI197V1 (LSM6DSOX) STEVAL-MKI200V1K (STTS22H) STEVAL-MKI207V1 (ISM330DHCX) STEVAL-MKI208V1K (IIS3DWB) STEVAL-MKI209V1K (IIS2ICLX) STEVAL-MKI210V2K (ISM330DHCX) STEVAL-MKI211V1K (LIS25BA) STEVAL-MKI212V1 (ASM330LHHX) STEVAL-MKI213V1 (LPS27HHW) STEVAL-MKI214V1 (LPS33K) STEVAL-MKI215V1 (LSM6DSO32) STEVAL-MKI216V1K (IIS3DHHC) STEVAL-MKI217V1 (LSM6DSOX, LIS2MDL) STEVAL-MKI218V1 (AIS2IH) STEVAL-MKI220V1 (LPS27HHTW) STEVAL-MKI221V1 (LSM6DSO32X) STEVAL-MKI222V1 (LIS2DU12) STEVAL-MKI223V1 (ILPS28QSW) STEVAL-MKI224V1 (LPS22DF) STEVAL-MKI225A (LPS28DFW) STEVAL-MKI226KA (AIS25BA) STEVAL-MKI227KA (LSM6DSV16X) STEVAL-MKI228KA (ILPS22QS) STEVAL-MKI229A (LSM6DSO16IS) STEVAL-MKI230KA (ISM330IS) STEVAL-MKI231KA (STHS34PF80) STEVAL-MKI233KA (ISM330ISN) STEVAL-MKI234KA (LSM6DSV16BX) STEVAL-MKI235KA (LIS2DUXS12) STEVAL-MKI236A (ASM330LHB ASIL-B) STEVAL-MKI237KA (LSM6DSV16BX) STEVAL-MKI238A (LIS2DUX12) STEVAL-MKI239A (LSM6DSV) STEVAL-MKI240KA (LSM6DSV32X) STEVAL-MKI241KA (LSM6DSV16B) STEVAL-MKI242A (ST1VAFE6AX) STEVAL-MKI243A (ASM330LHHXG1) STEVAL-MKI244A (ASM330LHBG1) STEVAL-MKI245KA (ISM330BX) STEVAL-MKI246KA (IIS2DULPX) STEVAL-MKI247A (LSM6DSV80X) STEVAL-MKI248KA (ISM6HG256X) STEVAL-MKI249KA (ST1VAFE6AX) STEVAL-MKI250KA (ST1VAFE3BX) STEVAL-MKI251A (LSM6DSV320X) STEVAL-MKI252KA (IIS3DWG1) STEVAL-MKI255A (MIS2DU12) STEVAL-MET001V1 (LPS22HB) SENSEVAL-SHT4XV1 (SHT40-AD1B) SENSEVAL-SCB4XV1 (SHT40-AD1B, SGP40-D-R4, LPS22DF)
Table 2. Supported hardware and firmware with reduced sensor evaluation
Hardware platformFirmwareSupported sensor
X-NUCLEO-IKS02A1DatalogExtended.bin (from the X-CUBE-MEMS1 package)ISM330DHCX IIS2MDC IIS2DLPC In the DIL24 socket: STEVAL-MKI212V1 (ASM330LHHX) STEVAL-MKI245KA (ISM330BX) STEVAL-MKI246KA (IIS2DULPX)
X-NUCLEO-IKS01A3DatalogExtended.bin (from the X-CUBE-MEMS1 package)LSM6DSO LIS2DW12 LIS2MDL LPS22HH HTS221 In the DIL24 socket: STEVAL-MKI125V1 (A3G4250D) STEVAL-MKI151V1 (LIS2DH12) STEVAL-MKI153V1 (H3LIS331DL) STEVAL-MKI185V1 (IIS2MDC) STEVAL-MKI191V1 (IIS2DLPC) STEVAL-MKI193V1 (ASM330LHH) STEVAL-MKI194V1 (LSM6DSR) STEVAL-MKI195V1 (LSM6DSRX) STEVAL-MKI197V1 (LSM6DSOX) STEVAL-MKI207V1 (ISM330DHCX) STEVAL-MKI209V1K (IIS2ICLX) STEVAL-MKI210V2K (ISM330DHCX) STEVAL-MKI212V1 (ASM330LHHX) STEVAL-MKI215V1 (LSM6DSO32) STEVAL-MKI218V1 (AIS2IH) STEVAL-MKI221V1 (LSM6DSO32X) STEVAL-MKI222V1 (LIS2DU12) STEVAL-MKI223V1 (ILPS28QSW) STEVAL-MKI224V1 (LPS22DF) STEVAL-MKI225A (LPS28DFW) STEVAL-MKI227KA (LSM6DSV16X) STEVAL-MKI228KA (ILPS22QS) STEVAL-MKI234KA (LSM6DSV16BX) STEVAL-MKI235KA (LIS2DUXS12) STEVAL-MKI238A (LIS2DUX12) STEVAL-MKI239A (LSM6DSV) STEVAL-MKI240KA (LSM6DSV32X) STEVAL-MKI241KA (LSM6DSV16B) STEVAL-MKI247A (LSM6DSV80X) SENSEVAL-SHT4XV1 (SHT40-AD1B)
X-NUCLEO-IKS4A1DatalogExtended.bin (from MEMS Studio)LSM6DSV16X LSM6DSO16IS LIS2DUXS12 LIS2MDL LPS22DF STTS22H SHT40-AD1B In the DIL24 socket: STEVAL-MKI125V1 (A3G4250D) STEVAL-MKI151V1 (LIS2DH12) STEVAL-MKI153V1 (H3LIS331DL) STEVAL-MKI179V1 (LIS2DW12) STEVAL-MKI185V1 (IIS2MDC) STEVAL-MKI191V1 (IIS2DLPC) STEVAL-MKI192V1 (LPS22HH) STEVAL-MKI193V1 (ASM330LHH) STEVAL-MKI194V1 (LSM6DSR) STEVAL-MKI195V1 (LSM6DSRX) STEVAL-MKI196V1 (LSM6DSO) STEVAL-MKI197V1 (LSM6DSOX) STEVAL-MKI207V1 (ISM330DHCX) STEVAL-MKI209V1K (IIS2ICLX) STEVAL-MKI212V1 (ASM330LHHX) STEVAL-MKI212V1 (ASM330LHHX) STEVAL-MKI215V1 (LSM6DSO32) STEVAL-MKI218V1 (AIS2IH) STEVAL-MKI221V1 (LSM6DSO32X) STEVAL-MKI222V1 (LIS2DU12) STEVAL-MKI223V1 (ILPS28QSW) STEVAL-MKI225A (LPS28DFW) STEVAL-MKI228KA (ILPS22QS) STEVAL-MKI234KA (LSM6DSV16BX) STEVAL-MKI238A (LIS2DUX12) STEVAL-MKI239A (LSM6DSV) STEVAL-MKI240KA (LSM6DSV32X) STEVAL-MKI241KA (LSM6DSV16B) STEVAL-MKI242A (ST1VAFE6AX) STEVAL-MKI245KA (ISM330BX) STEVAL-MKI247A (LSM6DSV80X) STEVAL-MKI250KA (ST1VAFE3BX) STEVAL-MKI251A (LSM6DSV320X) STEVAL-MKI255A (MIS2DU12)
X-NUCLEO-IKS5A1DatalogExtended.bin (from MEMS Studio)ISM6HG256X ISM330IS IIS2DULPX IIS2MDC ILPS22QS In the DIL24 socket: STEVAL-MKI191V1 (IIS2DLPC) STEVAL-MKI209V1K (IIS2ICLX) STEVAL-MKI210V2K (ISM330DHCX) STEVAL-MKI212V1 (ASM330LHHX) STEVAL-MKI212V1 (ASM330LHHX)STEVAL-MKI218V1 (AIS2IH) STEVAL-MKI245KA (ISM330BX) STEVAL-MKI255A (MIS2DU12) SENSEVAL-SHT4XV1 (SHT40-AD1B)
STEVAL-MKBOXPRO (SensorTile.box Pro)DatalogExtended.bin (from MEMS Studio)LSM6DSV16X LIS2DU12 LIS2MDL LPS22DF STTS22H In the DIL24 socket: STEVAL-MKI110V1 (AIS328DQ) STEVAL-MKI125V1 (A3G4250D) STEVAL-MKI151V1 (LIS2DH12) STEVAL-MKI153V1 (H3LIS331DL) STEVAL-MKI179V1 (LIS2DW12) STEVAL-MKI191V1 (IIS2DLPC) STEVAL-MKI192V1 (LPS22HH) STEVAL-MKI193V1 (ASM330LHH) STEVAL-MKI194V1 (LSM6DSR) STEVAL-MKI195V1 (LSM6DSRX) STEVAL-MKI196V1 (LSM6DSO) STEVAL-MKI197V1 (LSM6DSOX) STEVAL-MKI207V1 (ISM330DHCX) STEVAL-MKI210V2K (ISM330DHCX) STEVAL-MKI212V1 (ASM330LHHX) STEVAL-MKI215V1 (LSM6DSO32) STEVAL-MKI218V1 (AIS2IH) STEVAL-MKI220V1 (LPS27HHTW) STEVAL-MKI221V1 (LSM6DSO32X) STEVAL-MKI228KA (ILPS22QS) STEVAL-MKI229A (LSM6DSO16IS) STEVAL-MKI234KA (LSM6DSV16BX) STEVAL-MKI235KA (LIS2DUXS12) STEVAL-MKI238A (LIS2DUX12) STEVAL-MKI239A (LSM6DSV) STEVAL-MKI240KA (LSM6DSV32X) STEVAL-MKI241KA (LSM6DSV16B) STEVAL-MKI242A (ST1VAFE6AX) STEVAL-MKI245KA (ISM330BX) STEVAL-MKI246KA (IIS2DULPX) STEVAL-MKI247A (LSM6DSV80X) STEVAL-MKI250KA (ST1VAFE3BX) STEVAL-MKI251A (LSM6DSV320X) STEVAL-MKI255A (MIS2DU12)
STEVAL-STWINBX1 (STWIN.box)DatalogExtended.bin (from MEMS Studio)ISM330DHCX IIS2MDC ILPS22QS STTS22H IIS2ICLX IIS2DLPC IIS3DWB In the DIL24 socket: STEVAL-MKI125V1 (A3G4250D) STEVAL-MKI151V1 (LIS2DH12) STEVAL-MKI179V1 (LIS2DW12) STEVAL-MKI182V2 (ISM330DLC) STEVAL-MKI192V1 (LPS22HH) STEVAL-MKI193V1 (ASM330LHH) STEVAL-MKI194V1 (LSM6DSR) STEVAL-MKI195V1 (LSM6DSRX) STEVAL-MKI196V1 (LSM6DSO) STEVAL-MKI197V1 (LSM6DSOX) STEVAL-MKI212V1 (ASM330LHHX) STEVAL-MKI215V1 (LSM6DSO32) STEVAL-MKI218V1 (AIS2IH) STEVAL-MKI220V1 (LPS27HHTW) STEVAL-MKI221V1 (LSM6DSO32X) STEVAL-MKI227KA (LSM6DSV16X) STEVAL-MKI229A (LSM6DSO16IS) STEVAL-MKI234KA (LSM6DSV16BX) STEVAL-MKI239A (LSM6DSV) STEVAL-MKI240KA (LSM6DSV32X) STEVAL-MKI241KA (LSM6DSV16B) STEVAL-MKI242A (ST1VAFE6AX) STEVAL-MKI245KA (ISM330BX) STEVAL-MKI247A (LSM6DSV80X) STEVAL-MKI251A (LSM6DSV320X) STEVAL-MKI255A (MIS2DU12)
Note: Reduced sensor evaluation on selected boards, in comparison with the full sensor evaluation on the professional MEMS tool, offers only selected features due to hardware platform and firmware limitations.
Table 3. Supported hardware for datalogging using Datalog2 (High Speed Datalog) firmware
Hardware platformFirmwareSupported sensor
X-NUCLEO-IKS02A1DATALOG2_Release.bin (from the FP-SNS-DATALOG2 package)ISM330DHCX IIS2MDC IIS2DLPC
STEVAL-MKBOXPRO (SensorTile.box Pro)DATALOG2_Release.bin (from the FP-SNS-DATALOG2 package)LSM6DSV16X LIS2DU12 LIS2MDL LPS22DF STTS22H In the DIL24 socket: STEVAL-MKI153V1 (H3LIS331DL) STEVAL-MKI223V1 (ILPS28QSW) STEVAL-MKI230KA (ISM330IS) STEVAL-MKI234KA (LSM6DSV16BX) STEVAL-MKI240KA (LSM6DSV32X) STEVAL-MKI247A (LSM6DSV80X) STEVAL-MKI251A (LSM6DSV320X)
STEVAL-STWINKT1B (STWIN)DATALOG2_Release.bin (from the FP-SNS-DATALOG2 package)ISM330DHCX IIS2MDC LPS22HH HTS221
STEVAL-STWINBX1 (STWIN.box)DATALOG2_Release.bin (from the FP-SNS-DATALOG2 package) ISM330DHCX IIS2MDC ILPS22QS STTS22H IIS2ICLX IIS2DLPC IIS3DWB In the DIL24 socket: STEVAL-MKI223V1 (ILPS28QSW) STEVAL-MKI230KA (ISM330IS) STEVAL-MKI245KA (ISM330BX) STEVAL-MKI246KA (IIS2DULPX) STEVAL-MKI248KA (ISM6HG256X)
Note: Other hardware platforms might be also supported by the Datalog2 firmware for more details check the latest version of the FP-SNS-DATALOG2 package.
Table 4. Supported hardware and firmware for library evaluation
Hardware platformFirmwareSupported sensor
X-NUCLEO-IKS02A1see Applications folder (from the X-CUBE-MEMS1 package)ISM330DHCX IIS2MDC Other components can be used if the application is generated through STM32CubeMX.
X-NUCLEO-IKS01A3see Applications folder (from the X-CUBE-MEMS1 package)LSM6DSO LIS2MDL LPS22HH HTS221 Other components can be used if the application is generated through STM32CubeMX.
X-NUCLEO-IKS4A1see Applications folder (from the X-CUBE-MEMS1 package)LSM6DSV16X LIS2MDL LPS22DF STTS22H Other components can be used if the application is generated through STM32CubeMX.
X-NUCLEO-IKS5A1see Applications folder (from the X-CUBE-MEMS1 package)ISM6HG256X IIS2MDC ILPS22QS Other components can be used if the application is generated through STM32CubeMX.
Table 5. Supported hardware and firmware with AlgoBuilder functionality
Hardware platformFirmwareSupported sensor
NUCLEO-F401RE or NUCLEO-U575ZI-Q or NUCLEO-U385RG-Q with X-NUCLEO-IKS5A1generated in AlgoBuilderISM6HG256X ISM330IS IIS2MDC ILPS22QS
NUCLEO-F401RE or NUCLEO-U575ZI-Q or NUCLEO-U385RG-Q with X-NUCLEO-IKS4A1LSM6DSV16X LSM6DSO16IS LIS2MDL LPS22DF SHT40-AD1B
NUCLEO-F401RE NUCLEO-U575ZI-Q with X-NUCLEO-IKS02A1 STEVAL-MKI230KA STEVAL-MKI230KA (ISM330IS) IIS2MDC
STEVAL-MKSBOX1V1 (SensorTile.box)LSM6DSOX LIS2MDL LPS22HH HTS221
STEVAL-MKBOXPRO (SensorTile.box Pro)LSM6DSV16X LIS2MDL LPS22DF STTS22H STEVAL-MKI229KA (LSM6DSO16IS) STEVAL-MKI251A (LSM6DSV320X)
STEVAL-STWINKT1B (STWIN)ISM330DHCX IIS2MDC LPS22HH HTS221
STEVAL-STWINBX1 (STWIN.box)ISM330DHCX IIS2MDC ILPS22QS STTS22H STEVAL-MKI230KA (ISM330IS) STEVAL-MKI248KA (ISM6HG256X)

Sensor evaluation

The sensor evaluation features are dynamically adjusted according to the available functionalities of the connected evaluation board, sensor, and firmware.

Quick Setup page

The Quick Setup page allows the user to configure basic sensor configurations such as the output data rate, full scale, and others according to the device datasheet. The content of the page is adjusted according to the connected evaluation board, sensors, and firmware.

If more evaluation modes are available like sensor fusion low-power, FIFO, TDM, and others, they can be selected on this page. The available sensor evaluation pages are adjusted according to the selected mode. If applicable, the control can align its status to the current register value.

The Easy Configuration button configures the sensor to a predefined configuration to stream sensor data. The Reset Device Configuration button restores the default sensor configuration. The Reset Timestamp button resets the timestamp value to 0 and clears all application data buffers, which means it will also clear all the charts.

Figure 16. Quick Setup page


Registers Map page

The Registers Map displays the list of device registers divided by register pages, if any.

Every register item has a Read, Write, and Default(restore default value) button enabled according to the datasheet and a bit view populated according to the register value.

Using the dedicated button ?, any register item can be expanded to explore the register value bit map description.

Figure 17. Registers Map page


Custom Register Action allows direct read and write transactions to a single register by specifying the register address, page and value.

Figure 18. Custom register action

Save to File page

The user can use this page to save a stream of sensor output data in a .csv file for postprocessing. This can be done by selecting the data to be stored.

The Browse button is used to select the folder and insert the file name. The acquisition period can be set to a fixed time in [ms] if desired. Then data to be saved can be selected from the list. The acquisition can be controlled using the Start and Stop buttons. If the Logging timeout option is used, the acquisition is going to run as long as the timeout period. A label can be assigned to the log using the Set label option.

Figure 19. Save to File page


If the sensors are configured according to different output data rates, the user can select the Data log period source from among the available data types using a dedicated selection option. Refer to the following figure.
Figure 20. Data log period source


If the Timestamp is selected as the datalog period source, every new data from any sensor will create a new line in the log file. For other sensors that do not have new data at that moment, the line is filled with previous data. A new data flag is used to distinguish which data points are new in that particular line. The new data flag is a bit field with following meaning.
Table 6. New data flag values
SensorBitValue
Pressure Sensor10x001
Temperature Sensor20x002
Humidity Sensor30x004
Accelerometer40x008
Gyroscope50x010
Magnetometer60x020
Interrupt70x040
MLC80x080
FSM90x100
ISPU100x200
VAFE/QVAR110x400
Accelerometer120x800

When using Datalog2 (High Speed Datalog) firmware, data are primarily stored in Datalog2 native binary format. Using the Convert to CSV switch, binary format can be automatically converted to CSV format at the end of the logging session. After conversion to a CSV file, an additional column called data_changed is added to indicate changes. This value is a bit field that shows which data in the current row is new. The first bit (LSB) indicates new data in the first sensor data column, the second bit indicates new data in the second sensor data column, and so on.

Data Table tool

The Data Table tool displays the output values measured by the sensor connected to the evaluation board. This view provides an overview of all samples received with a table data update rate of 0.5 Hz to reduce overall CPU/ GPU consumption. This functionality is disabled in the case of very high data rates.

Figure 21. Data Table tool


Data Monitor tool

The Data Monitor tool displays the latest output values measured by the sensor connected to the evaluation board. This view provides an overview of the last samples received with an update rate of 10 Hz to reduce overall CPU/GPU consumption in the case of high data rates.

Figure 22. Data Monitor tool


MLC Monitor, FSM Monitor, ISPU Monitor

The MLC Monitor, FSM Monitor, and ISPU Monitor pages can be used to display output from the machine learning core (MLC) or finite state machine (FSM) including the label assigned to each output value and output from the intelligent sensor processing unit (ISPU). This feature provides a clear and user-friendly overview of the current states and classifications detected by the sensors, making it easier to monitor and interpret the results in real time. The textual values are taken from the JSON file with the sensor configuration, which is loaded from the Load/Save Configuration or Example Configurations pages.

Figure 23. MLC Monitor

Bar Charts tool

The Bar Charts tool displays the data measured by the sensor in a bar chart format.

The height of each bar is determined by the amplitude of the signal measured by the sensor along the corresponding axis. The full scale of the graph depends on the configuration and can be changed through either the Quick Setup or the Registers Map tab.

Figure 24. Bar Charts tool


Line Charts tool

The Line Charts tool shows the evolution of the output over time. This tool generates a time graph of data samples from the connected sensors.

Each waveform can be shown or hidden by clicking on the corresponding colored box in the top bar of the plot.

The user can click on the minus and plus at the bottom of the graph object to manually scale the plot horizontally. Furthermore, using a dedicated scroll bar at the bottom of the page, the user can display the older samples.

By mousing over the plot area, the top bar labels are updated to display the collected values of the samples.
Figure 25. Line Charts tool


Note: Individual signals can be disabled or enabled in the chart top bar. Using a right mouse click in this area, all channels can be selected or deselected.
Hovering over the right side of a graph object, available options and settings are displayed such as:
  • Fit: updates the Y-axis scale to fit all waveforms
  • Auto: automatic update of the Y-axis scale
  • Full: sets the full-scale value according to the device configuration
  • Save: exports a screenshot of the chart to an image file in .png format
  • Copy: saves the chart as an image in the system clipboard
  • Help: displays the available keyboard shortcuts for navigation in the chart
Figure 26. Line chart options and help




Scatter Plot tool

The Scatter Plot tool shows the graphical representation of the magnetometer data using Cartesian coordinates. In general, a scatter plot is used to display values for typically two variable sets of data.

The plot shows three lines according to the sensor axes (X-Y, Y-Z, X-Z). The three lines can be enabled and disabled independently by clicking on the corresponding colored box at the top of the graph. By clicking on the Clear button, the user can reset all data in the plot.

The plot component detects mouse wheel events in order to zoom in or out on data. Auto allows the user to set the automatic zoom in order to fit all data on the graph.
Figure 27. Scatter Plot tool


Compass tool

The Compass tool shows an example of a compass application, which can be implemented using a 6-axis module (3-axis accelerometer and 3-axis magnetometer).

The algorithm uses the magnetometer data to measure the Earth’s magnetic field, and the accelerometer data to compensate for the inclination of the board. Rotating the board, the application shows the heading of the compass.

The performance of the compass is related to the configuration used. So, the application shows the current configuration and the recommended configuration (accelerometer and magnetometer ODR).

Before using the compass demo, the system must be calibrated by moving the board randomly for a few seconds; the quality of the calibration step is indicated by the compass object border color according to the legend on the right side.

Figure 28. Compass tool


Interrupt tool

The Interrupt tool allows evaluating the interrupt generation features of the MEMS sensor.

On this page, it is possible to configure the characteristics of the inertial events that must be recognized by the device and to visualize (in real time) the evolution of the interrupt lines.

The application provides access to the interrupt registers, which allow the configuration of the interrupt sources of the device.

The user can configure the interrupts using the dedicated combo box in order to load the recommended configurations in the device.

Figure 29. Interrupt tool


Inclinometer tool

The Inclinometer tool represents the angle between the accelerometer axis and the horizontal plane. This tool is available if the sensor in use integrates an accelerometer.

Figure 30. Inclinometer tool


FFT tool

The FFT tool displays the fast Fourier transform of the sensor data. The page shows the frequency-domain plot for each axis of the selected sensor.

The tool provides various options such as:

  • DC nulling: removes the DC component from the signal
  • Magnitude: calculates Euler’s formula of the vector composed of the axis components
  • Magnitude (scale): Y-axis scale
  • Frequency (scale): X-axis scale
  • Style: style of chart (waveform or bars)
  • Window: window function applied to the signal before FFT evaluation
  • Length: length of the window used to evaluate FFT (number of samples from which FFT is computed)
  • Zero padding: number of zero samples added to the captured signal
  • Show spectrogram: enables or disables spectrogram visualization
  • Fixed refresh rate: updates the FFT chart without overlapping windows
  • Fixed overlap: updates the FFT chart, overlapping windows according to the slider value of the window overlap
  • Slider value: percentage of the samples saved for the next FFT computation
Figure 31. FFT tool


6D tool

The 6D tool provides an example of how to use the 6D position function.

On this page, it is possible to configure the interrupt for 6D recognition by clicking on the 6D Enabled toggle button.

After loading the configuration, the selected 3D model is oriented depending on the 6D position detected.

The window also shows (in real time) the evolution of the interrupt line.

The user can change the register configuration by setting different values in the interrupt registers as shown in the tool.

Figure 32. 6D tool


3D Plot tool

The 3D Plot tool shows the graphical representation of the magnetometer data in 3D space.

Zooming in and out of the chart is possible using the mouse wheel. Changing the view angle is possible by clicking and panning in the chart.

Figure 33. 3D Plot tool


Features Demo page

The Features Demo page allows the user to evaluate demo modes available for a connected sensor when this feature is supported. The side menu on the right displays indicators to notify the user about event detection and set parameters, if applicable.

Figure 34. Features Demo page


Communication and Power Settings tool

The Comm. & Power Settings tool allows the user to select a communication interface like I²C, SPI 3-wire, SPI 4-wire, I3C if available, read the current consumption, set the VDD and VDDIO values and select between Interrupt and Polling Data Reading Mode. This functionalities are available only on the Professional MEMS tool board (STEVAL-MKI109D, STEVAL-MKI109V3).

Figure 35. Comm. & Power Settings tool


FIFO tool

The FIFO tool can be used to test the first-in first-out data buffer embedded in the device when this feature is supported by the sensor (see the device datasheet for more details).

By using the combo box available on the page, the FIFO can be configured in all the supported modes (for example, bypass, FIFO, stream, stream-to-FIFO).

The application shows the values of the X, Y, Z data stored in the deep FIFO buffer, indicating both numerical data and the corresponding graph.

Figure 36. FIFO tool


Sensor fusion tool

Some sensors can be equipped with the sensor fusion low-power (SFLP) feature for generating game rotation vector, gravity vector, and gyroscope bias data based on the accelerometer and gyroscope data processing. If this feature is available, the evaluation can be activated on the Quick Setup page.

Figure 37. Evaluation mode selection

If sensor fusion mode is selected, the available sensor evaluation pages are adjusted according to this mode. Game rotation vector, quaternions, gravity vector, and gyroscope bias signals are added in Data Table, Data Monitor, Bar Charts, Line Charts and Save to File. The 3D Model page is available in this mode. A 3D model is displayed on this page and the orientation of the model changes based on the game rotation vector data so the model follows the sensor movement. Different 3D models can be selected. The initial position of the model can be set by using the Reset Model button.

Figure 38. 3D Model page

Load/Save Configuration page

The Load/Save Configuration page allows the user to save and load the current register configuration. Clicking on the Save button stores the register values in a .json file. The saved configuration can be loaded at any time by clicking on the Load button.

Figure 39. Load/Save Configuration page


Example Configurations page

The Example Configurations page is available for sensors equipped with FSM, MLC, or ISPU features. This page downloads content directly from the STMicroelectronics GitHub repository, providing an up-to-date list of example configurations for embedded features. Users can select a configuration and upload it directly to the sensor for immediate testing.

Figure 40. Example Configurations page

Library evaluation

Middleware libraries for ST sensors are provided in the X-CUBE-MEMS1 package. This package contains dedicated projects for each library, which can be used for library evaluation. Using MEMS Studio and the firmware for a particular library with the selected development board, a user can evaluate the functionality of the library.

After the development board is programmed with the selected firmware, the connection can be established by selecting Communication port and pressing the Connect button. Used sensors are indicated by the firmware, and they are listed on the Connect page with all details.

Figure 41. Connect page for library evaluation

After a successful connection, the Library Evaluation functionality is added in the menu.

The library evaluation offers:
  • Save To File
  • Data Table
  • Data Monitor
  • Data visualization pages
  • Time Statistics
  • Data Injection

Save To File

The user can use this page to save a stream of sensor and library output data in a .csv file. This can be done by selecting the data to be stored. The Browse button is used to select the folder and insert the file name, then the Start and Stop buttons define the acquisition period. Additionally, the user can define a recording timeout using the dedicated toggle button and text field to interrupt data logging after a defined [ms] interval.

Figure 42. Save To File page

Data Table

The Data Table tool displays the output values from the sensors and libraries. This view provides an overview of all values received with a table data update rate of 0.5 Hz to reduce overall CPU/GPU consumption.

Figure 43. Data Table

Data Monitor

The Data Monitor tool displays the latest output values from the sensors and libraries. This view provides an overview of the last samples received with an update rate of 10 Hz to reduce overall CPU/ GPU consumption.
Figure 44. Data Monitor

Data visualization pages

The available data visualization pages depend on the selected library. Line charts, bar charts, and a scatter plot (for magnetometer data) are always available to visualize sensor data. Additional pages for visualization of library outputs like 3D plot, 3D model, status indicator and table, and others are displayed based on the library functionality.

Figure 45. Example of data visualization pages

Time Statistics

The Time Statistics page displays the library elapsed time in line charts and statistical information line average, min, max values.

Figure 46. Time Statistics page

Data Injection

The Data Injection page allows injecting previously acquired sensor data into the library input instead of real-time sensor data. The library processes the data and sends the results in the same way as working with real-time sensor data. All the other features for the evaluation of the library are available and active.

The data log file with previously acquired data can be opened by clicking on the Browse button. The data must be acquired with the minimum sampling rate frequency given by the library and the library evaluation firmware. The data log with the higher sampling rate is automatically decimated. Input data are displayed in the table.

Data injection is enabled by switching the firmware to Offline mode. Data injection is controlled by the Start and Stop buttons. Injection line by line can be done using the Step button. The active line is highlighted in the table. A wraparound to move from the last sample to the first sample can be activated using the Repeat toggle switch.

Figure 47. Data injection page

Finite state machine (FSM) tool

The finite state machine page allows the user to configure the state machines and test their functionality on the connected device in order to detect a sequence of events with specific timing (example: hand or head gesture).

FSM implementation consists of three tools:

  • Configuration: allows configuring the available state machines on the device
  • Testing: shows plots with sensor data, interrupts, and state machine output register information
  • Debug: (available only on the ProfiMEMS board). This page lets the user inject log file samples into the device in order to evaluate the number of interrupts detected and the overall FSM results based on a selected configuration.
Figure 48. FSM page


FSM parameters

Figure 49. Configuration of FSM parameters - menu bar


  • Sensor selector: displays the selected device to configure
  • State machine selector: displays the selected state machine to configure. This selection is applied to both the configuration page and debug page if available.
  • FSM ODR: this setting determines the processing / output data rate of the FSM samples.
  • Converter: this tool helps to generate the values to be set in the threshold resources in the Variable Data section. It converts a float32 value into a float16 format and vice versa.
  • FSM Start Address: determines the first address written in the FSM registers while configuring the state machines

Configuration

This tab lets the user add commands and conditions to the selected state machine and visualize diagrams while editing state parameters. A dedicated tool bar illustrates the actions that can be performed.

Figure 50. Configuration tab


The right side of the configuration tab shows the active parameters and provides the capability to edit them in order to update the values of the resources used in the Variable Data section. This section shows the active and enabled resources, depending on the list of instructions that have been set by the user in the FSM state diagram on the left side.



Figure 51. FSM configuration toolbar


The FSM configuration tool bar provides the capability to perform actions on all device state machines or on a single state machine. Some actions are available only if the target device is connected, such as writing or reading data to/from the connected device, while others might work in a different way such as loading an FSM configuration.

Loading an FSM configuration decodes configuration data on a host pc if no target device is connected or writes a configuration on the device and then decodes device data if the target device is connected to the MEMS Studio application in order to allow the user to inspect configuration data, ensuring the best reliability of data shown in the GUI.

  • Load all state machines from file: loads multiple state machines from .json file and populates the GUI
  • Save all state machine as: exports state machines configuration to a dedicated .json file
  • Load device configuration from file: imports all state machine configurations, writes the configuration to the device, and updates the GUI according to the written instructions
  • Save device configuration as: exports the instructions of the device configuration for configuring all state machines to a .json file
  • Reset state machine: clears the selected state machine GUI data without changing the device configuration
  • Read FSM configuration from sensor: updates all state machine GUI data according to the current FSM device configuration
  • Write FSM configuration to sensor: writes all current state machine GUI data to the device
  • Load state machine: loads one state machine from .fsm (legacy) or .json file and populates the GUI
  • Save current FSM: exports the current state machine configuration to a .json file
  • Reset all state machines: clears all state machine GUI data
  • Read state machine from examples: displays the available FSM examples for the selected device with their descriptions and allows the user to load a configuration to the GUI

Testing

This tab shows the available sensor data compatible with the FSM configuration, interrupt data plots, and FSM output register values. A dedicated blinking LED graphic is toggled every time an FSM interrupt is detected during the parsing of the FSM status register data and once it is activated, its state is not changed for ~300 msec.

This page helps the user to check the program functionalities after the FSM configuration is completed.

Figure 52. Testing tab


Debug

The Debug function allows debugging the selected state machine sample by sample after loading an input data pattern.

The main purpose of this tab is to check the state machine functionality in order to validate the program using recorded log files, assuming the device is configured as it was before starting to log data in the file.

During data injection, the Program Pointer and the Reset Pointer are updated according to the data that are read from the device.

The Program Pointer value contains the current address of the program and it is used to highlight the corresponding state in the diagram. The Reset Pointer value contains the address of the state or condition related to the CONTREL command or return condition of the program.

The tool provides the user with several data injection interactive controls to inject one or multiple samples at a time and write output data to a dedicated table.

Every command before a condition and every condition has a radio button to configure a break point for pausing the data injection process if the program pointer address is equal to the address of the item with the enabled break point indicator. Whenever a break point is activated, the background color of the current state changes according to the selected color theme of the application.

Data injection controls

  • Run: injects all the next samples
  • Pause: pauses the data injection process
  • Stop: interrupts the data injection process and exits debug mode.
  • Next: injects the next sample and updates the table with output data
  • Next step: injects a defined number of samples according to the Step lengthsettings
  • Export log: exports the content of the table with the results to a .csv file

The data table is updated at every step if the Results at each step switch is enabled, otherwise it is updated only when the data injection is paused or stopped. The Read OUTS registers switch enables or disables reading sensor output registers. The Read INT registers switch enables or disables reading interrupts status registers. Detect INT indicates the number of detected interrupts in the processed log file.

Figure 53. Debug tab


Machine learning core (MLC) tool

The machine learning core (MLC) tool allows the user to configure a machine learning core that is embedded in some devices. For more details about the MLC, consult the specific application note for the sensor you would like to use. The configuration procedure is divided into several steps appearing in different tabs:

  • Data patterns: allows managing the data patterns to be used and assigning a label to each data pattern loaded
  • AFS tool: allows processing acquired data and recommends window length, filters, and features that can be used for decision tree generation
  • ARFF generation: allows configuring inputs, filters, and features to generate an .arff file
  • Decision tree generation: allows configuring the decision tree outputs and generating the decision trees
  • Config generation: allows setting the metaclassifier and generating the configuration file
  • Decision tree output viewer: allows live monitoring of MLC outputs in the chart when testing the generated MLC configuration
  • Debug: allows testing the MLC configuration using previously acquired data

To start configuring the machine learning core, the workspace directory must be selected using the Browse button. After that a device must be selected. If a sensor using the MLC is connected, it is selected automatically. The entire MLC configuration is stored in the mlc_settings.json file inside the workspace directory. The changes are automatically saved to this file. The MLC configuration can be imported into the active workspace using the Import button.

All artifacts generated during the MLC configuration process can be deleted using the Clear Workspace button, and the mlc_settings.json is not deleted. All the settings can be deleted and restored to the default values using the Clear Settings button. The history of the performed actions and results are accessible in a dedicated window, which can be displayed using the Open Log button.

Data patterns

The Data patterns tab allows managing the data patterns to be used for the machine learning processing. The data patterns that are possible to load must have the same data format as the log files generated by MEMS Studio, Unico-GUI, or Unicleo-GUI.

A data pattern(s) is selected using the Browse button. Multiple files can be selected. A class label must be assigned to each data pattern, which is then used for machine learning processing. The class label is confirmed by the Load button. Data patterns can be removed from the list using the trash bin button in the tables.

Figure 54. Data patterns tab


AFS tool

The AFS tool offers the possibility to estimate suitable window length, filters, and features for classification done by the decision tree.

Automatic window length calculation

The window length is calculated based on the lowest frequency present in the signal across all data classes.

Automatic filter selection

There are two methods that can be used for automatic filter selection. Basic search is a peak-based method that identifies the maxima of the signal in the frequency spectrum. This method is less computationally expensive, but it is not accurate on flat signals without significant peaks. Exhaustive search is an entropy-based method that searches all combinations of frequency bands (on a logarithmic scale) and selects the frequency of interest that minimizes the entropy against the other classes.

Automatic feature selection

The automatic feature selection algorithm considers filters generated by the automatic filter selection and the features are computed for different filters and raw data. It uses an ensemble method for feature importance and cross correlation to remove highly correlated features. The following statistical features are supported for both single axis and norm: mean, variance, energy, peak to peak, minimum, maximum. The automatic feature selection algorithm selects the top features by computing the rank of each feature according to an ensemble method and averaging across all ensemble methods. There are five different ensemble methods available to determine feature importance: ANOVA, Ada Boost (ADA), Sequential Feature Selection (SFS), Random Forest (RF), Recursive Feature Elimination (RFE). By default, ANOVA, Ada Boost, Random Forest, and Recursive Feature Elimination are used as methods for ranking important features. Including Sequential Feature Selection may improve the overall performance but increases the overall runtime.

Data analysis takes into account the machine learning core ODR and input specification parameters from the ARFF generation tab. The window length is also taken from this tab in case the window length calculation is not enabled.

After the desired parameter selection, the data analysis is executed using the Run button.

The generated window length, filter, and features can be transferred to the MLC configuration in the ARFF generation tab using the Apply to Settings button.

Figure 55. AFS tool tab

ARFF generation

Attribute-Relation File Format (ARFF) is a file format used for storing data in machine learning applications. It contains a list of instances, where each instance represents a single window processed by the MLC.

The ARFF generation tab allows configuring sensor and MLC parameters. The MLC processes the data at the Machine Learning Core ODR rate in consequential data windows. The number of samples in each window can be configured by the Window length option. The MLC processes the sensor data specified in the Inputs section. The full scale and output data rate of the selected sensors can be defined. Filters offer preprocessing on the machine learning core input signals. The Features section contains a list of features that are calculated from the input data (filtered or not filtered). After setting all the parameters, the ARFF file can be generated using the Generate ARFF File button. Statistical parameters computed from the inputs are then used for classification in the decision tree.

Figure 56. ARFF generation tab


Decision tree generation

The Decision tree generation tab allows configuring a decision tree using selected classes to process and evaluating decision tree classification performance. The Number of decision trees can be specified.

A new decision tree algorithm was introduced in MEMS Studio v2.0.0. The new algorithm has both depth-first and best-first tree building implementations, implements Breiman's cost-complexity pruning, and identifies optimal tree size using cross validation.

The maximum depth of the tree (Max depth), minimum samples required in a leaf node (Min leaf samples), and Percentage of data to use for training can be configured.

The previous algorithm can be enabled using the Use legacy decision tree train algo switch. In this case, the Maximum number of nodes and Confidence factor, which control decision tree pruning, can be set.

A decision tree is generated using the Generate Decision Tree button. A file with an externally generated decision tree definition can be loaded using the Import button. After decision tree generation or loading, statistical parameters of the decision tree like accuracy, number of instances, confusion matrix, and others are displayed. The resulting decision tree can be analyzed using the Inspect tree info button for a textual content or using Show Decision Tree for a graphical representation of the same.

Figure 57. Decision tree generation tab


Figure 58. Inspect tree info (textual content)


Figure 59. Decision tree (graphical representation)


If the user imports a decision tree, a feature mapping is needed to map every feature selected during arff generation with feature listed into decision tree file every feature selected during arff generation must be mapped, listing each feature in the decision tree file. Note that this mapping is applied for every decision tree imported or generated.

Figure 60. Confirmation of features mapping


Config generation

The Config generation tab allows configuring the metaclassifiers and generating the .json file containing the machine learning core configuration.

The generated MLC configuration can be stored also in .h file using the Export As button.

In the case of a board with a selected sensor connected, the generated configuration can be uploaded to the sensor using the Load Config into Sensor button.

Figure 61. Config generation tab


Decision tree output viewer

The Decision tree output viewer tab allows testing the generated MLC configuration by monitoring individual MLC outputs in the chart.

Figure 62. Decision tree output viewer tab


Debug

The Debug tab allows checking the MLC functionality in order to validate the configuration using previously recorded log files, assuming the device is configured as it was before starting to log data in the file.

Data injection control

  • Run: injects all the next samples
  • Pause: pauses the data injection process with the possibility to resume it
  • Stop: interrupts the data injection process and exits debug mode.
  • Next: injects the next sample and updates the table with output data
  • Next step: injects a defined number of samples according to the Step lengthsettings
  • Export log: exports the content of the table with the results to a .csv file

The data table is updated at every step if the Results at each step switch is enabled, otherwise it is updated only when the data injection is paused or stopped. The Number of decision tree set settings specifies which MLC output registers will be monitored.

Figure 63. Data injection

The debug page provides the user with a dedicated converter tool to simplify data conversion during log data processing. The tool can be opened using the Show Convertor button. The debug tool works with raw data in LSB and it converts sensor data internally into LSB using the sensitivity evaluated on the basis of a given configuration file if no LSB data was given.

The MLC in the hardware configures conditions in the units of measurement, which is why users might need a converter tool to easily understand if a certain condition of a decision tree is verified for a certain LSB data. For example if a decision tree condition has a threshold of 0.5 g, the corresponding LSB threshold value will be 1024 using a sensitivity of 0.488.

Figure 64. Convertor tool

Merge MLC + FSM tool

Merging MLC and FSM configurations requires a special procedure. The Merge MLC + FSM tool can be used to perform combinations of separate MLC and FSM configuration files into one file.

Note: The tool acs on the MLC and FSM configuration only. The user must ensure the two configurations are compatible in terms of general sensor configuration like output data rate or full-scale settings.
Figure 65. Merge MLC + FSM page

Pedometer

The Pedometer tool can be used to configure and test the pedometer embedded in the device when this feature is supported by the sensor (see the device datasheet for more details).

There are three different tabs for this tool:

  • Configuration tab: allows fast-configuring the pedometer with its default configuration
  • Debug tab: used to load a data pattern into the device in order to test the pedometer on the pattern loaded
  • Regression Tool tab: allows finding an optimal configuration based on a predefined dataset
Note: Pedometer Configuration and Debug pages are available only on ProfiMEMS board if device with pedometer support is connected.

Configuration

The Configuration tab allows fast-configuring the pedometer. In this window, it is possible to visualize in real time the evolution of both the accelerometer signal and the two interrupt lines and to read the pedometer step count output.

The user can enable and configure the pedometer with its default configuration using a dedicated button.

The GUI also allows directly accessing the pedometer-related registers in order to set a user-defined pedometer configuration.

Figure 66. Configuration tab


Debug

The Debug tab is used to load a data pattern into the device and run the pedometer logic on the pattern itself (offline postprocessing).

On the right side of the GUI, a three-button toolbar is available for loading a data pattern in the GUI. Pedometer configuration can be loaded from a .ucf or .json file. It is also possible to fast-configure the pedometer in its default configuration by clicking on the Pedometer Easy Configuration button.

The device enters debug mode right after the data pattern has been loaded.

On the top of the GUI, a toolbar is available to control the data injection, which can be applied with the maximum level of flexibility:

Data injection controls:
  • Run: injects all samples
  • Pause: pauses the data injection process with the possibility to resume it
  • Stop: interrupts the data injection process and exits debug mode
  • Next: injects the next sample and updates the table with the output data
  • Next step: injects a defined number of samples according to the Step lengthsettings
  • Export log: exports the content of the table with the results to a .csv file

The data table is updated at every step if the Results at each step switch is enabled, otherwise it is updated only when the data injection is paused or stopped.

Once the debug session is completed, another debug session can be started (the data pattern must be reloaded).

Figure 67. Debug tab


Regression Tool

The Regression Tool tab allows finding an optimal configuration on the basis of a predefined dataset (in this context, a dataset is a collection of data patterns with a reference number of steps for each pattern).

On the right side of the GUI, the initialization view contains the two initialization parameters:

  • Error type: the error to be minimized by the tool (that is, mean, mean plus standard deviation, mean plus two times the standard deviation)
  • Complexity level: the level of depth (in terms of iterations) of the regression. The execution time of a low-complexity level regression is lower than a high-complexity level, but the parameter space is less deeply explored.

At the top of the GUI, the run view contains the textbox for the input data path and the output file path.

Using dedicated Start and Stop buttons, the user can run the regression. A progress bar is available in order to notify the user about the progress of the regression.

Note: The input data path to be specified in the textbox must be a folder containing only the pedometer data patterns to be applied to the regression session. Each file must contain accelerometer data in a tab or space-separated format in [mg] and collected at the proper output data rate according to the pedometer description in the datasheet. Each filename must contain the ‘stepsXXX’ string, where XXX is the effective reference number of steps (that is, test001_steps100.txt, data_steps54.txt, pattern_steps1043.txt).

Once the regression has been completed, the tool generates a folder under the output folder, named [data]_[hour]_Pedometer, containing two files:

  • pedometer.ucf, containing the optimal pedometer configuration generated by the tool
  • regression_tool.config, containing some metainformation used by the Regression Tool itself and statistical data about the pedometer performance on the input dataset

Under the output folder, another regression_tool.config file is generated. This file is automatically used by the Regression Tool in order to start a new regression analysis from the optimal configuration found in the latest regression executed. If the user's intention is to run a new regression from scratch (starting from the default pedometer configuration), the user should click on the Clear Regression History button.

Figure 68. Regression Tool tab


ISPU IDE

The ISPU IDE page is an easy-to-use development environment intended for creating ISPU projects, modifying source code, compiling projects, and programming the ISPU in the sensors.

To fully utilize this page, the paths to the ISPU toolchain and Make utility need to be set on the External Tools page in the application Settings. The ISPU toolchain is a set of tools that compiles source code written in C into binary format, and then into a header file and a JSON file containing a sequence of operations required to program the ISPU in the sensor. The compilation and conversion process is invoked using the Make utility.

Figure 69. ISPU IDE page
The ISPU IDE can be controlled using the toolbar.
Table 7. ISPU IDE toolbar functions
Toolbar iconFunction
Create new ISPU project
Open directory with ISPU project
Save changes
Open file in system default text editor
Reload file
Build ISPU project
Program sensor

An ISPU project needs to be created starting from an ISPU template. The ISPU template is a set of files that can be modified by the user to program ISPU functionality. The Create new Project dialog window opens by clicking on the icon. In this dialog, the Project name and Project folder need to be defined, as well as the ISPU template location. The template location is predefined to the default folder where the template is distributed with the MEMS Studio installer.

Figure 70. Create new project

The ISPU IDE page is divided into three sections. The Explorer section allows navigation through the folder structure to open files, which can then be edited in the File section. The Console section displays output from the build process.

The build process can be executed only if a makefile is open or if the projetc folder is selected.

ISPU Model Converter

The ISPU Model Converter page allows importing pretrained neural network (NN) models from popular ML frameworks. Users can analyze these models in detail, optimize and convert them to .c / .h files, and finally validate the converted model (on the host PC or target using dedicated firmware).

The mentioned .c / .h files might then be included in a custom project (template available in the ISPU GitHub repository in order to build a binary to run the neural network on the ISPU-equipped sensor.

Figure 71. ISPU Model Converter page


There are four different tabs for this tool:



  • Load NN Model / Generate: loads the pretrained neural network model in the application, generates the .c / .h files and a "Generate" textual report related to the NN model conversion process
  • Analyze: provides information about the NN model architecture, its memory footprint, and computational complexity. It also generates an “Analyze” textual report from the NN model and represents data in table and radar charts.
  • Validate: runs the original and the converted models and compares the results. It also generates a “Validate” textual report from the NN model and represents a summary of data in table, radar chart, and confusion matrix, if applicable.
  • Benchmark: allows the user to compare different model results by numerical parameters and graphical representation using radar charts

Load NN Model / Generate page

To start configuring the ISPU Model Converter, the Workspace directory and the Output directory must be selected using the corresponding Browse buttons.

All GUI settings set during neural network processing can be restored to the default values by clicking on the Clear Settings button.

By clicking on the Terminal button, accessible from all pages, the user is able to inspect additional information related to the execution of commands requested in the available pages.

Figure 72. ISPU Model converter configuration bar


A drag and drop box allows importing NN files with supported formats such as Keras, ONNX, and TFLite (.h5, .onnx, .tflite).

Figure 73. ISPU Model converter drop area


By clicking on the [Display NN graph] button, the user is able to see visual graph of the chosen neural network model. To be able to access this function, the user needs to install the Netron application on the device and add it to the MEMS Studio tool path in the “External Tools” page.

Figure 74. Selected file options view


Figure 75. Neural network graph


The Model history section stores files previously uploaded by the user, displaying their directory path and the date of upload. Users can reselect files if they still exist in the same directory by clicking the Select button or delete them from the list by clicking on Delete. Deleting a file from the history only removes it from the graphical view, not from the container directory.
Figure 76. Loaded model history list


Once the workspace directory, output directory, and file to process are set, the Run Generate button becomes active. Users are able to start the generation of reports, .c and .h files by clicking on this button. Once the process is completed, the Inspect Report button becomes active, allowing users to view the textual report generated.

An additional button Open Output Directory is shown to navigate to the output directory.



Figure 77. Output directory


Analyze page

Figure 78. Analyze page


Once the workspace directory, output directory, and file to process are set, the Run Analyze button becomes active and the user is able to start the analysis of the neural network model. Once the process is completed, the Inspect Report button becomes active, allowing users to view the textual report generated.

Users can view a summary of the report with the following data representation:

• Table: displays structured data extracted from the Analyze report, providing a detailed overview of key information

• Radar Chart: shows data metrics in a radar chart format, offering a graphical representation of different parameters.

Note: All the parameters in the radar chart are normalized in order to present data in a range [0, 1]. They are not in the same scale, so, to be able to show them in a radar chart, they are normalized according to their maximum value.

Considering (as an example) the LSM6DSO16IS sensor, the list of maximum values for radar chart parameters is as follows:

  • Total data ram: 8 KiB (activation + input + output size)
  • Activation: 8 KiB
  • Input: 8 KiB
  • Output: 8 KiB
  • Total code ram: 32 KiB (weight + code)
  • Weight: 32 KiB

The percentage of total ram used by the model is divided into two parts: data ram (8 KiB), which is the sum of activation, input and output size, and code ram (32 KiB), which includes code size and weight size.

Validate page

Figure 79. Validate page


On the Validate page, the user is able to run the original and converted models and compare the results by clicking on the Run Validate button. The converted model runs on the host PC and on the Target by connecting the sensor and choosing the mode to run On Host/ On Target. Once the process is completed, the Inspect Report button becomes active, allowing users to view the textual report generated. The processed data results are available in three different representations:

  • Table: displays real values extracted from the Validate report, providing detailed information about various neural network metrics and parameters
  • Radar Chart: displays normalized values in a radar chart format, offering a graphical representation of the key parameter.
    Note: All the parameters in the radar chart are normalized in order to present data in a range [0, 1]. They are not on the same scale, so, to be able to show them in a radar chart, they are normalized according to their maximum value.
The maximum scale for each parameter is:
  • Classification accuracy: 100 percent
  • Cosine: 1
  • Nash-Sutcliffe efficiency: 1

Converter models have more similar results to the original model if the parameters are close to the maximum.

  • Confusion Matrix: if available in the report, displays the performance of a classification model, showing true positive, true negative, false positive, and false negative values, assuming the original model as the reference
  • Select the output: this combo box appears if the model contains multiple outputs, then the user is able see the result in a table based on the selected output
To be able to "Run Validate" on the Target, after selecting the mode On Target, the user needs to import the UCF file. In order to generate the ISPU UCF file  using MEMS Studio, the ISPU-toolchain path should be set in the “External Tools” page and a valid validation template should be selected. MEMS Studio embeds a template and link to download it. Once the Generate Validate UCF request is completed, a new .ucf file is created in the output directory in the subdirectory ispu_validation_out /make/bin/ispu.ucf
Figure 80. Validate options bar


By default, the validation of the selected neural network is executed using random data. The user can select custom input and output to quantize using custom data.

Figure 81. Validate input/output selection bar


Benchmark page

Figure 82. Benchmark page


On the Benchmark page, the user can compare different neural network models through numerical and visual results. This functionality allows for the comparison of the same model in different validation modes (On Host / On Target).

A drag and drop box allows importing neural network report files with the supported format as text (.txt).

Figure 83. Benchmark drop area


By clicking on the Export results button, the user is able to extract the results of the entire benchmark table as a .csv file.

By clicking on the Show Chart button, the user is able to see multiple layers and compare the parameter visually.

Figure 84. Benchmark result options


The radar chart viewer displays normalized values in a radar chart format, offering a graphical representation of the key parameter in multiple layers of the selected model.

Note: All the parameters in the radar chart are normalized in order to present data in a range [0, 1]. They are not on the same scale, so, to be able to show them in a radar chart, they are normalized according to their maximum value.
The maximum scale for each parameter is:
  • Classification accuracy: 100 percent
  • Cosine: 1
  • Nash-Sutcliffe efficiency: 1
  • Total