STM32Cube software libraries: new features for MEMS

STMicroelectronics Pty Ltd

By ElectronicsOnline Staff
Thursday, 10 August, 2017


Img 1288

STMicroelectronics’ software expansions X-CUBE-MEMS1 and X-CUBE-MEMSMIC1 have recently been updated to offer features such as real-time acoustic beamforming, as well as to improve how data from the motion sensors is processed.

ST continuously releases new and improved software so engineers can efficiently take advantage of hardware features, powerful technologies and the latest standards, to ensure they design better products faster. In fact, the union of hardware and software will be discussed at ST’s next Developers Conference on 6 September in Santa Clara, California.

To prepare for this annual event, ST’s Life.Augmented blog has reviewed some of the recent updates to STM32Cube software libraries — packages that contain hardware abstraction layers (HAL), APIs, real-time operating systems, drivers and even application examples with their source code, among many other things. This article will look at the libraries that are said to make ST’s microelectromechanical systems (MEMS) special.

STM32Cube: X-CUBE-MEMS1

X-CUBE-MEMS1 is a suitable package when it comes to developing an application revolving around ST’s sensors. It contains drivers and sample implementations for its thermometer-hygrometer (HTS221), barometer (LPS25HB or LPS22HB) or magnetometer (LIS3MDL or LSM303AGR), or its system-in-package solutions combining a gyroscope and an accelerometer (LSM6DS0 or LSM6DSL). There’s also a Unicleo application, which takes in data from the sensors and outputs it to a graphical user interface (GUI) that helps visualise results, to more effectively program applications. To quickly take advantage of the pre-built binaries, one can use the following stack (the first board on top):

  • Sensor board: X-NUCLEO-IKS01A1 and X-NUCLEO-IKS01A2
  • STM32 platform: NUCLEO-F401RE or NUCLEO-L476RG

New motion libraries

This software expansion pack received a huge upgrade, as a lot of ODE libraries have now become available as middleware in the X-CUBE-MEMS1 project. One of the most popular examples is MotionFX, which was first released in the FP-SNS-ALLMEMS1 STM32 ODE Function Pack. The library uses the data from multiple sensors and advanced algorithms to increase accuracy and performance, a process known as ‘sensor fusion’.

To help engineers master the library quicker, X-CUBE-MEMS1 also includes the application example DataLogFusion (path ./Projects/Multi/Applications/), which shows how the software can estimate the device’s position by using its accelerometer, gyroscope and magnetometer. As with all the other ST packs, source codes are freely available and all the necessary files are already organised by toolchain, so importing them to an integrated development environment (IDE) is simple.

STM32Cube: X-CUBE-MEMSMIC1

As smart speakers and speech recognition are on everyone’s mind, X-CUBE-MEMSMIC1 becomes the one-stop solution to tackle complex audio problems. The expansion software package has the necessary tools to quickly work with the MP34DT01-M, an omnidirectional digital microphone that uses a capacitive sensing element. It also includes special drivers so the device can automatically function as a USB microphone, to immediately start audio streaming. Engineers can finally put together the stack listed below to work with the precompiled binaries (the first board listed is at the top):

  • Digital MEMS microphone: X-NUCLEO-CCA02M1
  • STM32 Board: NUCLEO-F072RB, NUCLEO-F401RE, NUCLEO-F746ZG, NUCLEO-L053R8, or NUCLEO-L476RG. Only the NUCLEO-F401RE works with all the precompiled applications at this point.

Beamforming and source localisation

X-CUBE-MEMSMIC1 has received two new libraries: acoustic beamforming (AcousticBF) and acoustic source localisation (AcousticSL). The first uses the sound recorded by two digital MEMS microphones and processes the signal using an algorithm, which can determine the particular direction in space of a source while rejecting the ambient noise. Such technology can ensure that the user’s voice is easily recognisable, even in a noisy environment. The library is also quite powerful because it allows engineers to tune the system to find the right balance between output quality and resource consumption. There are also numerous customisation options to adjust the output resolution to the noise level and other environmental factors.

AcousticSL works well with the two digital MEMS microphone soldered on the X-NUCLEO-CCA02M1, but users can also add two more, such as the STEVAL-MKI129V1, to increase accuracy. The library combines three direction of arrival (DOA) algorithms to estimate the angle at which the audio source is coming from. Depending on the number of microphones, the application will work on a 180° or 360° plane, and a series of parameters will help designers fine tune the resolution in accordance with the needs of their application.

To know more about STM32 Cube expansion software, visit ST’s website.

Originally published here.

Related Articles

STM32Cube software libraries: new features for MEMS

STMicroelectronics' software expansions X-CUBE-MEMS1 and X-CUBE-MEMSMIC1 have recently been...

Making the right product choices for harsh environments

Electronic devices and systems located in harsh environments will always struggle to perform as...

It takes a village: why you need a software platform powered by a robust ecosystem

If you're still using point solutions and wasting valuable time and energy working on...


  • All content Copyright © 2017 Westwick-Farrow Pty Ltd