STMicroelectronics FP-SNS-FLIGHT1 Quick Start Guide

Quick Start Guide
STM32Cube function pack for IoT node with NFC, BLE connectivity and time-of-flight sensors (FP-SNS-FLIGHT1)
Version 3.2 (Sep 28, 2020)
Agenda
1
3
Documents & Related Resources
4
STM32 Open Development Environment: Overview
2
2
Setup & Demo Examples
1- Hardware and Software overview
Hardware Overview
4
Sample implementations are available for:
1. STM32 Nucleo with expansion boards
NUCLEO-F401RE (or NUCLEO-L476RG) + X-NUCLEO-NFC04A1 + X-NUCLEO-IDB05A2 + X-NUCLEO-53L1A2
2. STM32 Nucleo with expansion boards
NUCLEO-F401RE (or NUCLEO-L476RG) + X-NUCLEO-IDB05A2 + X-NUCLEO-53L1A2
Bluetooth Low Energy Expansion Board
STM32 Nucleo with Expansion boards - Hardware Overview (1/4)
Key Product on board
STM32 Nucleo expansion board based on the BlueNRG-M0 Bluetooth v4.2 compliant, FCC and IC certified module (FCC ID: S9NBNRGM0AL; IC: 8976C-BNRGM0AL)
BlueNRG-M0 main features:
Embedded Bluetooth low energy protocol stack (GAP, GATT, SM, L2CAP, LL,
RFPHY)
Embedded BlueNRG-MS network processor
On-board chip antenna
M95640-RMC6TG 64-Kbit serial SPI bus EEPROM with high-speed clock interface
X-NUCLEO-IDB05A2 Hardware Description
The X-NUCLEO-IDB05A2 Bluetooth low energy expansion board is based on the BlueNRG-M0 BLE network processor module.
The BlueNRG-M0 is Bluetooth v4.2 compliant. It supports simultaneous
master/slave roles and can behave as a Bluetooth low energy sensor and hub device at the same time.
The BlueNRG-M0 provides a complete RF platform in a tiny form factor, with integrated radio, antenna, high frequency and LPO oscillators.
5
BlueNRG-M0 Module
Arduino UNO R3 connector
M95640-RMC6TG
Latest info available at www.st.com
X-NUCLEO-IDB05A2
Dynamic NFC/RFID tag IC expansion board
STM32 Nucleo with Expansion boards - Hardware Overview (2/4)
6
Key Product on board
ST25DV04KV Dynamic NFC/RFID tag IC with 4-Kbit, 16-Kbit or 64-Kbit EEPROM, and Fast Transfer Mode capability
X-NUCLEO-NFC04A1 Hardware Description
The X-NUCLEO-NFC04A1 dynamic NFC/RFID tag IC expansion board is based on the ST25DV04K NFC Type V/RFID tag IC with a dual interface 4 Kbits EEPROM that also features an I²C interface. It can be powered by the pin of Arduino connector or directly by the received carrier electromagnetic field.
The X-NUCLEO-NFC04A1 expansion board is compatible with the Arduino™ UNO R3 connector pin assignment and can easily be plugged
onto any STM32 Nucleo board. Various expansion boards can also be stacked to evaluate different devices operating together with the dynamic
NFC tag. The board also features an antenna with a 54 mm ISO 24.2
diameter, single layer, copper etched on PCB.
Latest info available at www.st.com
X-NUCLEO-NFC04A1
Arduino UNO R3 connector
ST25DV04K
Printed Antenna
VL53L1 Nucleo expansion board (X-NUCLEO-53L1A2)
STM32 Nucleo with Expansion boards - Hardware Overview (3/4)
Key Product on board
VL53L1 Time-of-Flight ranging sensor with multi object detection and field of view (FoV) programming
X-NUCLEO-53L1A2 Hardware Description
The X-NUCLEO-53L1A2 is an expansion board that provides a complete evaluation kit which allows anyone to learn, evaluate, and develop their
applications using the VL53L1 ToF ranging sensor with advanced multi
object detection and FoV programming.
The X-NUCLEO-53L1A2 expansion board is delivered with a cover glass holder in which three different spacers of 0.25, 0.5, and 1 mm height can be fitted below the cover glass to simulate various air gaps. Two VL53L1 breakout boards can be connected using two 10-pin connectors.
The X-NUCLEO-53L1A2 expansion board is compatible with the STM32 nucleo board family, and with theArduino UNO R3 connector layout.
Latest info available at www.st.com
X-NUCLEO-53L1A2
7
VL53L1
Important Hardware Additional Information
STM32 Nucleo with Expansion boards - Hardware Overview (4/4)
8
Before connecting the X-NUCLEO-NFC04A1 to the X-NUCLEO-IDB05A2 expansion board through the Arduino UNO R3 extension connector,
remove the resistors R1 and R11 onto X-NUCLEO-NFC04A1 board, as shown the Figure below in green
Modifications on the X-NUCLEO-NFC04A1 board
FP-SNS-FLIGHT1
Software Overview
9
Software Description
The FP-SNS-FLIGHT1 is an STM32Cube function pack which let your IoT node connect to a smartphone via BLE and uses a suitable Android™ or iOS™ application like the STBLESensor app to view real-time environmental time-of-flight sensor data.
It uses the NDEF standard for simple and secure Bluetooth pairing, storing the necessary information on the NFC tag, thus simplifying the device configuration.
This package, together with the suggested combination of the STM32 and ST devices, can be used to develop wearable applications, or smart things applications in general.
Key features
Complete firmware to develop an IoT node with NFC, BLE connectivity and time-of-flight sensors
Sample implementation available for X-NUCLEO-NFC04A1 (optional), X-NUCLEO-53L1A2 and X-
NUCLEO-IDB05A2 connected to a NUCLEO-F401RE or NUCLEO-L476RG
Compatible with STBLESensor application for Android/iOS, to perform sensors data reading, audio and motion algorithms features demo, and firmware update (FOTA).
Easy portability across different MCU families, thanks to STM32Cube.
Free, user-friendly
Important Software Additional Information
The 53L1A2 BSP has been treated as an exception in this package since its version is not compatible with the other BSPs used in this firmware .A patch (53L1A2_Patch.c), located in user­space (\Applications\FLIGHT1\Patch), replaces the original BSP file which has been disabled, allowing the whole software structure to work flawlessly license terms.
Latest info available at www.st.com
FP-SNS-FLIGHT1
Overall Software Architecture
2- Setup & Demo Examples
Setup & Demo Examples
Software and Other prerequisites
11
STSW-LINK004
STM32 ST-LINK Utility (STSW-LINK004) is a full-featured software interface for programming STM32 microcontrollers
FP-SNS-FLIGHT1
Copy the .zip file content into a folder on your PC. The package will contain source code example (Keil, IAR,
STM32CubeIDE) based only on NUCLEO-F401RE or NUCLEO-L476RG
ST BLE Sensor Application for Android/iOS (V4.8.0 or higher) to download from Google Store / iTunes
2.1- Setup Overview: STM32 Nucleo with Expansion boards
X-NUCLEO-NFC04A1
(optional)
Setup Overview
HW prerequisites with STM32 Nucleo Expansion boards
13
Mini USB
NUCLEO-F401RE NUCLEO-L476RG
1 x Dynamic NFC tag expansion board expansion board
(X-NUCLEO-NFC04A1) - Optional
1 x Bluetooth Low Energy expansion board (X-NUCLEO-IDB05A2)
1 x STM32 Nucleo proximity and gesture expansion board (X-NUCLEO- 53L1A2)
1 x STM32 Nucleo development board
(NUCLEO-F401RE or NUCLEO-L476RG)
1 x NFC-enabled Android™ or iOS™ device
1 x PC with Windows 7 and above
1 x USB type A to Mini-B USB cable
It is necessary to connect the boards in the order shown in this picture
X-NUCLEO-IDB05A2
X-NUCLEO-53L1A2
Setup Overview
Start coding in just a few minutes (1/3)
14
1
2
3
4
5
6
Select Function Pack: FP-SNS-FLIGHT1
www.st.com/stm32ode
.\Projects\STM32F401RE-Nucleo\Applications\FLIGHT1 .\Projects\STM32L476RG-Nucleo\Applications\ FLIGHT1
Android™/iOS™ smartphone and
ST BLE Sensor application (V4.8.0 or higher)
Use the pre-compiled binaries for registering your device, or alternative re-compile the code adding your device certificate
Download & unpack
FP-SNS-FLIGHT1 package structure
Docs BSP, HAL and drivers
NDEF Library and BlueNRG-MS
Application example Boot loader binary
Setup Overview
Start coding in just a few minutes (2/3)
15
1. How to install the pre-compiled binary:
For each applications, there is inside the package one folder called “Binary”
It contains:
pre-compiled FP-SNS-FLIGHT1 FW that could be flashed to a supported STM32 Nucleo Board using the ST-Link at the right
position (0x08004000)
Important Note: this pre-compiled binary is compatible with the FOTA update procedure
pre-compiled FP-SNS-FLIGHT1 + BootLoader FW that could be directly flashed to a supported STM32 Nucleo Board using the ST-Link or by doing “Drag & Drop” (the latter only for STM32 Nucleo boards)
Important Note: this pre-compiled binary is not compatible with the FOTAupdate procedure
Setup Overview
Start coding in just a few minutes (3/3)
16
2. 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 V8.50.5:
CleanFLIGHT1_IAR_F401.bat
CleanFLIGHT1_IAR_L476.bat
µVision toolchain - MDK-ARM Professional Version: 5.31.0:
CleanFLIGHT1_MDK_ARM_ F401.bat
CleanFLIGHT1_MDK_ARM_ L476.bat
STM32CubeIDE Version 1.4.2:
CleanFLIGHT1_STM32CubeIDE_F401.bat
CleanFLIGHT1_STM32CubeIDE_L476.bat
For Linux/iOS: only for STM32CubeIDE and for each platform there is one OpenOCD:
For Nucleo F401/L476:
CleanFLIGHT1_STM32CubeIDE_F401.sh
CleanFLIGHT1_STM32CubeIDE_L476.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 BootLoader at the right position (0x08000000)
Flash the FLIGHT1 firmware at the right position (0x08004000)
This is the firmware that was compiled with the IDEThis firmware is compatible with the FOTA update procedure
Save a complete Binary FW that includes both FLIGHT1 and the BootLoader
This binary can be directly flashed to a supported STM32 board using the ST-Link or by doing “Drag & Drop”Important Note: this additional pre-compiled binary is not compatible with the FOTA update procedure
Setup Overview
Flash Management and Boot Process
17
Flash Structure for STM32F446RE
Setup Overview
Bluetooth low energy and sensors software
18
FP-SNS-FLIGHT1 for NUCLEO-F401RE / NUCLEO-L476RG - Serial line monitor (e.g.Tera Term)
Configure the serial line monitor (speed, LF)
Pressing the RESET
button on STM32 Nucleo triggers the initialization phase
Pressing the USER button
the STM32 Nucleo will start the BLE service
The system only allows
secure connections:
For Android devices
with NFC reader, facility and security pairing is done by using the NFC tag
For other devices it is
necessary to manage the parameters manually
2.4- Demo Examples
ST BLE Sensor Application Overview
20
Demo Examples
ST BLE Sensor Application for Android/iOS (1/5)
Hardware Features
– Android Version
Objects distancesPlot Data: Objects distances and presence
21
Demo Examples
ST BLE Sensor Application for Android/iOS (2/5)
Hardware Features
– Android Version
Led Status
Rssi & Battery
Presence Detection
NOTE
The presence is identified inside a fixed range distances that can be modified by these line code:
#define PRESENCE_MIN_DISTANCE_RANGE 300 #define PRESENCE_MAX_DISTANCE_RANGE 800
in the file FLIGHT1_config.h that can find in the Inc users folder for each project.
22
Demo Examples
ST BLE Sensor Application for Android/iOS (3/5)
Settings
– Android version
If Settings is chosen, it is possible to change the node name using the node configuration
Menu option
Settings menu option Local Name
Node configuration menu option
23
Demo Examples
ST BLE Sensor Application for Android/iOS (4/5)
Debug Console
– Android version
Menu option
Debug Console (stdin/stdout/stderr)
Command Help
Command Info
Not Recognized Command
24
Demo Examples
ST BLE Sensor Application for Android/iOS (5/5)
Firmware Upgrade
– Android version
Menu option
Firmware upgrade page
Firmware update file selection
Application page during FOTA and on completion
Terminal window information during FOTA
3- Documents & Related Resources
Documents & Related Resources
26
All documents are available in the DESIGN tab of the related products webpage
Consult www.st.com for the complete list
FP-SNS-FLIGHT1:
DB2862: STM32Cube function pack for IoT node with NFC, BLE connectivity and time-of-flight sensors data brief
UM2026: Getting started with the STM32Cube function pack for IoT node with NFC, BLE connectivity and time-of-flight sensors user
manual
Software setup file
X-NUCLEO-NFC04A1:
Gerber files, BOM, Schematics
DB3301: Dynamic NFC/RFID tag IC expansion board based on ST25DV04K for STM32 Nucleo data brief
UM2235: Getting started with the X-NUCLEO-NFC04A1 NFC/RFID tag IC expansion board based on ST25DV04K for STM32 Nucleo user
manual
X-NUCLEO-IDB05A2
Gerber files, BOM, Schematic
DB4170: Bluetooth low energy expansion board based on the BLUENRG-M0 module for STM32 Nucleo data brief
UM2700: Getting started with X-NUCLEO-IDB05A2 BLE expansion board based on the BlueNRG-M0 module for STM32 Nucleo user
manual
X-NUCLEO-53L1A2:
Gerber files, BOM, Schematic
DB4214: Time-of-Flight ranging sensor with multi object detection and programming FoV expansion board based on VL53L1 for STM32 Nucleo data brief
4- STM32 Open Development
Environment: Overview
STM32 Open Development Environment
Fast, affordable Prototyping and Development
28
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...