Datasheet STM32Cube Datasheet (STMicroelectronics)

Quick Start Guide
STM32Cube function pack for ultra-low power IoT node with Artificial Intelligence (AI) application based on audio and motion sensing (FP-AI-SENSING1)
Version 1.5 (April 13, 2021)
Agenda
Hardware and Software overview
Documents & Related Resources
STM32 Open Development Environment: Overview
2
Setup & Demo Examples
1- Hardware and Software overview
1. STM32 Nucleo with expansion boards
NUCLEO-L476RG + X-NUCLEO-CCA02M1 + X-NUCLEO-IDB05A1 + X-NUCLEO-IKS01A2
2. STEVAL-STLKT01V1 evaluation boards
STEVAL-STLCS01V1 + STEVAL-STLCR01V1 + STEVAL-STLCX01V1
3. STM32L4 Discovery Board for IoT node (B-L475E-IOT01A)
4. STEVAL-MKSBOX1V1 evaluation board
Hardware Overview
4
Motion MEMS and environmental sensors expansion board
STM32 Nucleo with Expansion boards - Hardware Overview (1/4)
5
Latest info available at www.st.com
X-NUCLEO-IKS01A2
Key Product on board
LSM6DSL MEMS 3D accelerometer (±2/±4/±8/±16 g) + 3D gyroscope (±125/±245/±500/±1000/±2000 dps)
LSM303AGR MEMS 3D magnetometer (±50 gauss) + MEMS 3D accelerometer (±2/±4/±8/±16 g)
LPS22HB MEMS pressure sensor, 260-1260 hPa absolute digital output barometer
HTS221 Capacitive digital relative humidity and temperature
DIL 24-pin Socket available for additional MEMS adapters and other sensors (UV index)
X-NUCLEO-IKS01A2 Hardware Description
The X-NUCLEO-IKS01A2 is a motion MEMS and environmental sensor evaluation board system.
It is compatible with the Arduino UNO R3 connector layout, and is designed around ST’s latest sensors.
LPS22HB
HTS221
DIL 24-pin
Arduino UNO R3 connector
ST morpho connector**
LSM6DSL LSM303AGR
** Connector for the STM32 Nucleo Board
Bluetooth Low Energy Expansion Board
STM32 Nucleo with Expansion boards - Hardware Overview (2/4)
6
X-NUCLEO-IDB05A1 Hardware Description
The X-NUCLEO-IDB05A1 is a Bluetooth Low Energy (BLE) evaluation and
development board system, designed around ST’s SPBTLE-RF Bluetooth Low Energy module based on BlueNRG-MS.
The BlueNRG-MS processor hosted in the SPBTLE-RF module communicates with
the STM32 Nucleo developer board host microcontroller though an SPI link available on the Arduino UNO R3 connector.
Key Products on board
SPBTLE-RF
Bluetooth Low Energy, FCC and IC certified, module based on Bluetooth® Low Energy wireless network processor BlueNRG-MS, BLE4.2 compliant.
SPBTLE-RF integrates a BALF-NRG-01D3 balun and a chip antenna. It embeds 32 MHz and
32.768 kHz crystal oscillators for the BlueNRG-MS.
M95640-R 64-Kbit serial SPI bus EEPROM with high-speed clock interface
Latest info available at www.st.com
X-NUCLEO-IDB05A1
Digital MEMS microphone expansion board
Hardware Overview (3/4)
7
X-NUCLEO-CCA02M1 Hardware Description
The X-NUCLEO-CCA02M1 is a board based on digital MEMS
microphones. It has two MP34DT01–M microphones soldered on board and it offers the possibility to plug additional microphones using MP34DT01 based coupon evaluation boards (STEVAL­MKI129V* or STEVAL-MKI155V* ).
The X-NUCLEO-CCA02M1 enables the acquisition and streaming
of up 4 microphones using both I2S and SPI bus available on ST morpho connector.
Key Products on board
MP34DT01-M: Ultra-compact, low-power, omnidirectional, digital MEMS
microphone built with a capacitive sensing element and an IC interface.
Latest info available at www.st.com
X-NUCLEO-CCA02M1
MP34DT01-M
USB ConnectorMicrophone coupons housing
Morpho connector
Arduino UNO R3 connector
Important Hardware Additional Information
Hardware Overview (4/4)
8
Before connecting the expansion board to the NUCLEO-L476RG board it is needed to change default solder bridges on the expansion boards
Open
SB25
Open
SB7/SB15/SB17
Close SB12/SB16
On the X-NUCLEO-CCA02M1
On the X-NUCLEO-IKS01A2
SensorTile development kit (STEVAL-STLKT01V1)
Hardware Overview
SensorTile development kit Hardware Description
STEVAL-STLKT01V1 is the development kit for the SensorTile board (STLCS01V1), a highly Integrated Development
Platform with a broad range of functionalities aiming to improve system design cycle and accelerate delivery of results
Two host boards are also provided as part of the kit, both featuring SWD programming interface
Cradle expansion has a plugin connection for SensorTile Core System and an Arduino interface
The Cradle is a small host featuring battery charger and SD card interface that supports on-the-field testing and
data acquisition campaigns
Key Product on board
SensorTile module (STEVAL-STLCS01V1) with STM32L476JG, LSM6DSM, LSM303AGR, LPS22HB, MP34DT05-A, BlueNRG-MS, BALF-NRG-02D3 and LD39115J18R
SensorTile expansion Cradle board equipped with audio DAC, USB port, STM32 Nucleo, Arduino UNO R3 and SWD connector
SensorTile Cradle with battery charger, humidity and temperature sensor, SD memory card slot, USB port and breakaway SWD
connector
100 mAh Li-Ion battery
Plastic box
SWD programming cable
Latest info available at www.st.com
STEVAL-STLKT01V1
STM32L4 Discovery Board for IoT node (B-L475E-IOT01A)
Hardware Overview
STM32L4 Discovery Board for IoT node Hardware Description
The STM32L4 Discovery kit for the IoT node (B-L475E-IOT01A) allows users to develop applications with direct connection to cloud servers. The STM32L4 Discovery kit enables a wide diversity of applications by exploiting low­power multilink communication (BLE, Sub- GHz), multiway sensing (detection, environmental awareness) and ARM® Cortex®-M4 core-based STM32L4 Series features. Arduino™ Uno V3 and PMOD connectivity provide unlimited expansion capabilities with a large choice of specialized add-on boards.
Key Product on board
Ultra-low-power STM32L4 Series MCUs based on ARM® Cortex® -M4 core with 1 Mbyte of Flash memory and 128 Kbytes of SRAM, in LQFP100 package
Bluetooth® V4.1 module (SPBTLE-RF)
Sub-GHz (868 or 915 MHz) low-power-programmable RF module (SPSGRF-868 or SPSGRF-915)
Wi-Fi® module Inventek ISM43362-M3G-L44 (802.11 b/g/n compliant)
Dynamic NFC tag based on M24SR with its printed NFC antenna
2 digital omnidirectional microphones (MP34DT01)
Capacitive digital sensor for relative humidity and temperature (HTS221)
High-performance 3-axis magnetometer (LIS3MDL), 3D accelerometer and 3D gyroscope (LSM6DSL), 260-1260 hPa
absolute digital output barometer (LPS22HB), Time-of-Flight and gesture-detection sensor (VL53L0X)
USB OTG FS with Micro-AB connector
• Expansion connectors: Arduino™ Uno V3, PMOD
Flexible power-supply options: ST LINK USB VBUS or external sources
On-board ST-LINK/V2-1 debugger/programmer with USB re-enumeration capability: mass storage, virtual COM port and
debug port
Latest info available at www.st.com
B-L475E-IOT01A
STEVAL-MKSBOX1V1 evaluation board
Hardware Overview
Multi sensor kit with portable sensor box and smart sensor app Hardware Description
The STEVAL-MKSBOX1V1 (SensorTile.box) is a ready-to-use box kit with wireless IoT and wearable sensor platform to help you use and develop apps based on remote motion and environmental sensor data, regardless of your level of expertise. The SensorTile.box board fits into a small plastic shroud with a long-life rechargeable battery, and the ST BLE Sensor app on your smartphone connects via Bluetooth to the board and allows you to immediately begin using the wide range of default IoT and wearable sensor applications. SensorTile.box includes a firmware programming and debugging interface that allows professional developers to engage in more complex firmware code development using the STM32 Open Development Environment (STM32 ODE), which includes a sensing AI function pack with neural network libraries.
Key Product on board
Ultra-low-power STM32L4 Series MCUs based on ARM® Cortex® -M4 MCU 120 MHz with 2048 kbytes Flash
(STM32L4R9ZI)
Accurate temperature : STTS751
Low power precise 6x IMU: LSM6DSOX
Stand-alone XLs: LIS3DHH, LIS2DW12
Magnetometer: LIS2MDL
Altimeter / pressure sensor : LPS22HH
Wide-band microphone: MP23ABS1
Humidity sensor: HTS221
Latest info available at www.st.com
STEVAL-MKSBOX1V1
FP-AI-SENSING1
Software Overview
12
Latest info available at www.st.com
FP-AI-SENSING1
Software Description
FP-AI-SENSING1 is an STM32Cube function pack featuring examples that let you connect your IoT node to a smartphone via BLE and use a suitable Android™ or iOS™ application, like the ST BLE Sensor app, to configure the device.
The package enables advanced applications such as human activity recognition or audio scene classification, on the basis of outputs generated by neural networks (NN). The NN are implemented by libraries generated by the X-CUBE-AI extension for STM32CubeMX tool. The package comes with an AI utility for data logging and annotation on SD card. The user is able to record the data from the sensors and to define what are the classes or the events he wants to record. With the recorded annotated data, the user will be able to train his own Neural Network on his PC/GPU/Cloud, get the model, use X-CUBE-AI extension for STM32CubeMX tool for conversion, and then run it on the STM32 platform.
Key features
Complete firmware to develop an IoT node with BLE connectivity, digital microphone, environmental and motion sensors, and perform real-time monitoring of sensors and audio data
Middleware libraries generated thanks to STM32CubeMx extension called X-CUBE-AI, featuring example implementation of neural networks for real-time human activity recognition (HAR) and acoustic scene classification (ASC) applications
AI utility for data logging and annotation on SD card
Ultra-low power implementation based on the use on an RTOS
Compatible with ST BLE Sensor application for Android/iOS, to perform sensor data reading, audio
and motion algorithm feature demo, and firmware update over the air (FOTA)
Easy portability across different MCU families, thanks to STM32Cube.
Free, user-friendly license terms.
2- Setup & Demo Examples
2.1- Setup
X-NUCLEO-IKS01A2
NUCLEO-L476RG
Setup & Demo Examples
HW prerequisites
1x STM32 Nucleo Bluetooth Low Energy expansion board (X-NUCLEO- IDB05A1)
1x STM32 Nucleo Motion MEMS and environmental sensor expansion Board
(X-NUCLEO-IKS01A2)
1x STM32 Nucleo Digital MEMS microphone expansion board
(X-NUCLEO-CCA02M1)
1x STM32 Nucleo Development Board (NUCLEO-L476RG)
1x Android™ or iOS™ device
1x PC with Windows 7 and above
1x USB typeA to Mini-B USB cable
15
Mini USB
X-NUCLEO-CCA02M1
X-NUCLEO-IDB05A1
It is necessary to connect the boards in the order shown in this picture
Setup Overview
HW prerequisites and setup with SensorTile (1/2)
16
1x SensorTile Kit (STEVAL-STLKT01V1):
SensorTile Core System: STLCS01V1
SensorTile Cradle eXpansion: STLCX01V1
SensorTile Cradle: STLCR01V1
Battery
Programming cable
1x Android™ or iOS™ device
1x PC with Windows 7 and above
1x STM32-Nucleo or ST-Link programmer
1x USB type A to Mini-B USB cable for the ST-Link
1x USB type A to Micro-B USB cable for SensorTile Cradles
Mini USB
Micro USB
Setup Overview
HW prerequisites and setup with SensorTile (2/2)
17
CN2
Remove
Jumpers
SWD
(Pin1)
SWD
(Pin1)
Cradle SWD connection
Cradle eXpansion SWD connection
In order to program the board you need to connect an external ST -Link to the SWD connector on the cradles, a 5pin flat cable is provided within the SensorTile Kit package
The easiest way is to get an STM32-Nucleo board which includes an ST-Link V2.1 programmer
Be sure that CN2 Jumpers are OFF and connect your STM32 Nucleo board to the SensorTile Cradle through the provided cable paying attention to the polarity of the connectors. Pin 1 can be identified by a little circle on the PCB silkscreen (STM32 Nucleo board and SensorTile Cradle Expansion) or by the square shape of the soldering pad of the connector (SensorTileCradle).
Setup & Application Examples
HW prerequisites for B-L475E-IOT01A
18
1x B-L475E-IOT01A development board
Laptop/PC with Windows 7, 8 or 10
1 x microUSB cable
B-L475E-IOT01A
MicroUSB Cable
USB ST-Link
ST-Link Status
LED
Setup & Application Examples
HW prerequisites for STEVAL-MKSBOX1V1
19
STEVAL-MKSBOX1V1
MicroUSB Cable
Mini USB
ST-Link/V2
Setup & Application Examples
Software and Other prerequisites
20
STSW-LINK009
ST-LINK/V2-1 USB driver
STSW-LINK007
ST-LINK/V2-1 firmware upgrade
FP-AI-SENSING1
Copy the .zip file content into a folder on your PC. The package will contain source code example (Keil, IAR, System
Workbench) based only on NUCLEO-L476RG, STEVAL-STLKT01V1, B-L475E-IOT01A or STEVAL-
MKSBOX1V1
ST BLE Sensor Application for Android/iOS to download from Google Store / iTunes
FP-AI-SENSING1
Setup Overview
21
https://www.st.com/en/embedded-software/stm32-ode-function-pack-sw.html
www.st.com
1
FP-AI-SENSING1
Select
2
3
5
Compile/Flash and Run the project
Android™/iOS™
smartphone and ST ST BLE Sensor application
6
FP-AI-SENSING1 package structure
.\Projects\STM32L476RG-Nucleo\Applications\SENSING1\EWARM
Docs BSP, HAL and drivers BlueNRG, AI-Libraries, FatFs, FreeRTOS
Application example
Boot loader binary
IMPORTANT:
Read the chapter The Boot Process on User Manual for understanding how to install the Boot Loader on the board
Download & unpack
4
How to install the pre-compiled binary:
Inside the package there is one folder called “Binary” that contains:
pre-compiled FP-AI-SENSING1 (*.bin) FW that can be flashed to a supported NUCLEO-L476RG, SensorTile, SensorTile.box board or
B-L475E-IOT01Ausing the ST-Link at the right position (0x08004000)
Important Note: this pre-compiled binary is compatible with the FOTA update procedure
pre-compiled FP-AI-SENSING1+BootLoader (*_BL.bin) FW that could be directly flashed to a supported NUCLEO-L476RG,
SensorTile, SensorTile.Box board or B-L475E-IOT01A using the ST-Link or by doing “Drag & Drop” (the latter only for STM32 Nucleo and B-L475E-IOT01A)
Important Note: this pre-compiled binary is not compatible with the FOTA update procedure
FP-AI-SENSING1
Installation procedure (1/2)
22
Without Boot loader, can be used for FOTA
With Boot loader,
cannot be used for FOTA
How Install the code after compiling the project:
Compile the project with your preferred IDE
On Windows: for each IDE and for each platform there is one batch script:
IAR toolchain Embedded Workbench:
CleanSENSING1.bat
System Workbench for STM32:
CleanSENSING1.bat
µVision toolchain - MDK-ARM Professional:
CleanSENSING1.bat
For Linux/iOS: only for Openstm32 IDE and for each platform there is one OpenOCD:
CleanSENSING1.sh
It’s necessary to edit this file for setting the right installation and Library path
These scripts perform the following steps:
Full Flash Erase
Flash the right BootLoaderat the right position (0x08000000)
Flash the SENSING1 firmware at the right position (0x08004000)
This is the firmware that was compiled with the IDE
This firmware is compatible with the FOTA update procedure
Save a complete Binary FW that includes both SENSING1 and the BootLoader
This binary can be directly flashed to a supported STM32 Nucleo, SensorTile and B-L475E-IOT01A board board using the ST-Link or by doing “Drag & Drop” (the latter only for STM32 Nucleo and B-L475E-IOT01A boards)
Important Note: this additional pre-compiled binary is not compatible with the FOTA update procedure
FP-AI-SENSING1
Installation procedure (2/2)
23
FP-AI-SENSING1
Flash Management and Boot Process
24
Flash Structure
Boot Sequence
*Region 3 start for SensorTile.box is 0x08100000(vs. 0x08080000 for all other boards)
*
FP-AI-SENSING1
Using serial line monitor – e.g.Tera Term
25
FP-AI-SENSING for NUCLEO-L476RG or B-L475E-IOT01A
Configure the serial line monitor (speed, LF)
When pressing the RESET User button on STM32 board You can see the initialization phase
When the boards are
connected to an Android or iOS device, you can see what is transmitted via BLE
2.2- ST BLE Sensor Application
FP-AI-SENSING1
ST BLE Sensor Application for Android/iOS (1/6)
Initial Steps
27
Starting Page
Discovery Page
Clear Device Cache
Device Connected
FP-AI-SENSING1
ST BLE Sensor Application for Android/iOS (2/6)
Data Monitoring
28
Microphones level plotEnvironmental
Pedometer
Wake Up
Orientation
Accelerometer plot
Hardware Features
– Android Version
RSSI & Battery
Multiple events
FP-AI-SENSING1
ST BLE Sensor Application for Android/iOS (3/6)
HAR and ASC Features
29
HAR-GMP/HAR_IGN Activity Recognition
Audio Scene Classification
AI Algorithms
– Android version
FP-AI-SENSING1
ST BLE Sensor Application for Android/iOS (4/6)
Multi neural network Features
30
Configuration selection
AI Algorithms
– Android version
FP-AI-SENSING1
ST BLE Sensor Application for Android/iOS (5/6)
Data logger
31
SD Data Log
Android version
Data logging feature is available in order to enable users to create their data sets for
training their NN models
Pre-processing python scripts for model re-training are also provided in the package
Choose Sensors and Sampling
Frequency
Add Labels for Annotation
Log & Annotate Sensor Data
FP-AI-SENSING1
ST BLE Sensor Application for Android/iOS (6/6)
FOTA
32
Firmware Upgrade
– Android version
Terminal window information after FOTA
Firmware upgrade application page during FOTA and on completion
Firmware update file selection
Firmware update menu
3- Documents & Related Resources
Documents & Related Resources (1/2)
FP-AI-SENSING1
DB3785: STM32Cube function pack for ultra-low power IoT node with artificial intelligence (AI) application based on audio and motion sensing data brief
UM2524: Getting started with the STM32Cube function pack for ultra-low power IoT node for Artificial Intelligence (AI) application based on audio and motion sensing
user manual
Software setup file
X-NUCLEO-CCA02M1
Gerber files, BOM, Schematics
DB2593: Digital MEMS microphones expansion board based on MP34DT01-M for STM32 Nucleo data brief
UM1900: Getting started with the digital MEMS microphones expansion board based on MP34DT01-M for STM32 Nucleo user manual
X-NUCLEO-IDB05A1
Gerber files, BOM, Schematic
DB2592: Bluetooth Low Energy expansion board based on SPBTLE-RF module for STM32 Nucleo data brief
UM1912: Getting started with X-NUCLEO-IDB05A1 Bluetooth low energy expansion board based on SPBTLE-RF module for STM32 Nucleo user manual
AN4642: Overview of the BLE Profiles application for X-CUBE-BLE1, expansion for STM32Cube application note
X-NUCLEO-IKS01A2
Gerber files, BOM, Schematic
DB3009: Motion MEMS and environmental sensor expansion board for STM32 Nucleo data brief
UM2121: Getting started with the X-NUCLEO-IKS01A2 motion MEMS and environmental sensor expansion board for STM32 Nucleo user manual
34
All documents are available in the DESIGN tab of the related products webpage
Consult www.st.com for the complete list
Documents & Related Resources (2/2)
STEVAL-STLKT01V1
Gerber files, BOM, Schematic
DB2956: SensorTile development kit data brief
UM2101: Getting started with the STEVAL-STLKT01V1 SensorTile integrated development platform – user manual
B-L475E-IOT01A:
Gerber files, BOM, Schematic
DB3009: Motion MEMS and environmental sensor expansion board for STM32 Nucleo product specification
UM2121: Getting started with motion MEMS and environmental sensor expansion board for STM32 Nucleo user manual
STEVAL-MKSBOX1V1
Gerber files, BOM, Schematic
DB3903: SensorTile.box wireless multi sensor development kit with user friendly app for IoT and wearable sensor applications data brief
UM2580: How to use the wireless multi sensor development kit with customizable app for IoT and wearable sensor applications user manual
35
All documents are available in the DESIGN tab of the related products webpage
Consult www.st.com for the complete list
4- STM32 Open Development Environment: Overview
STM32 Open Development Environment
Fast, affordable Prototyping and Development
37
The STM32 Open Development Environment (STM32 ODE) is an open, flexible, easy, and affordable way
to develop innovative devices and applications based on the STM32 32-bit microcontroller family combined
with other state-of-the-art ST components connected via expansion boards. It enables fast prototyping with leading-edge components that can quickly be transformed into final designs
For further information, please visit www.st.com/stm32ode
Function Packs
(FP)
STM32Cube
development software
STM32 Nucleo
expansion boards
(X-NUCLEO)
STM32 Nucleo
development boards
STM32Cube
expansion software
(X-CUBE)
© STMicroelectronics - All rights reserved. The STMicroelectronics corporate logo is a registered trademark of the STMicroelectronics group of companies. All other names are the property of their respective owners.
Thank you
Loading...