STSW-DFU-EEPRMA Device Firmware Upgrade Over Bluetooth Using External EEPROM User Guide
- May 15, 2024
- ST
Table of Contents
Quick Start Guide
Device Firmware Upgrade over Bluetooth using
external EEPROM
(STSW-DFU-EEPRMA)
Version 1.0.0
Hardware and Software overview
STEVAL-IDB011V1 / STEVAL-IDB011V2
Hardware Overview
Evaluation platform based on the BLUENRG-355MC system-on-chip
The STEVAL-IDB011V1 or STEVAL-IDB011V2 evaluation platform is designed to help
you to develop and test Bluetooth® low energy applications using the BlueNRG-
LP low-power system-on-chip in combination with inertial and environmental
MEMS sensors, a digital MEMS microphone, various interface buttons, and LEDs.
It is compliant with the Bluetooth® LE specification and supports master,
slave, and simultaneous master-and-slave roles.
It features data length extension, 2 Mbps, long range, extended advertising
and scanning, as well as periodic advertising, periodic advertising sync
transfer, LE L2CAP connection-oriented channel, and LE power control and path
loss monitoring.
Key Product on board
64 MHz, 32-bit Arm®Cortex®-M0+core, a 256 KB programmable flash memory, a 64
KB SRAM, an MPU, and an extensive peripheral set (6x PWM, 2x I²C, 2x SPI/I2S,
SPI, USART, UART, PDM, and 12-bit ADC SAR).Latest info available at www.st.com
STEVAL-IDB011V1/2
Evaluation platform based on the BlueNRG-LPS system-on-chip
The STEVAL-IDB012V1 evaluation platform is designed to develop and test
Bluetooth® Low Energy applications using the low power BlueNRG-LPS system-on-
chip, in combination with inertial and environmental MEMS sensors, a digital
MEMS microphone, and various interface buttons and LEDs.
The BlueNRG-LPS is compliant with the Bluetooth® Low Energy specification. It
supports master, slave, simultaneous master and slave roles, data length
extension, 2 Mbps, long range, extended advertising and scanning, channel
selection algorithm #2, GATT caching, LE ping procedure, LE power control and
path loss monitoring, and direction finding (angle of arrival/angle of
departure) features.
Key Product on board
The BlueNRG-LPS features a 64 MHz, 32-bit Arm Cortex®-M0+ core, 192 KB
programmable flash memory, 24 KB SRAM, MPU, and an extensive peripheral set
(4x PWM, I²C, SPI/I2S, SPI, USART, LPUART, and 12-bit ADC SAR). Latest info
available at www.st.com
STEVAL-IDB012V1
X-NUCLEO-PGEEZ1
Hardware Overview
Standard SPI page EEPROM memory expansion board based on M95P32 series for
STM32 Nucleo
The X-NUCLEO-PGEEZ1 expansion board is designed for the M95P32 series SPI page
EEPROM for data reading and writing.
This expansion board allows developers to evaluate the new memory page EEPROM
through a single/dual/quad SPI interface.
It acts as an external storage device that can be used to store data, such as
manufacturing traceability, calibration, user settings, error flags, data
logs, and monitoring data to build more flexible and accurate applications.
Key Product on board
M95P32: Ultra low-power 32 Mbit Serial SPI Page EEPROM Latest info available
at www.st.com
X-NUCLEO-PGEEZ1
STSW-DFU-EEPRMA
Software Overview
STSW-DFU-EEPRMA Software Description
STSW-DFU-EEPRMA is a Device Firmware Upgrade STSW package with support of
external M95P32 EEPROM connected to either STEVAL-IDB011V1, STEVALIDB011V2 or
STEVAL-IDB012V1 on X-NUCLEO-PGEEZ1 EEPROM memory expansion board.
Key features
- Firmware demo for STEVAL-IDB011V1/2 or STEVAL-IDB012V1 with X-NUCLEOPGEEZ1 EEPROM memory expansion board
- Binary executables can be shared over Bluetooth to the device which are first written directly to external M95P32 EEPROM
- Flash upgrade from external M95P32 EEPROM
- OTA Service Manager based approach, which includes Bluetooth OTA service, it’s characteristics and OTA reset manager capabilities
- Application image not required to include OTA FW upgrade service
- Sample application demonstrating complete FOTA service
Overall Software Architecture
Latest info available at www.st.com
STSW-DFU-EEPRMA
FOTA : Flash Layout BlueNRG-LP/LPS
Software Overview
- BlueNRG-LP/LPS Flash Layout
- OTA Service Manager stored in Flash Memory of BlueNRG-LP/LPS is used to carry out Firmware Over The Air (FOTA) update
- On device reset, Service Manager decides where the device should boot from
- Service Manager starts from address 0x1004 0000
- User Application starts from address 0x1005 7800
- User can jump from User application to Service manager to start OTA session by pressing “Reset” once and then holding “PUSH1” button pressed
![STSW-DFU-EEPRMA Device Firmware Upgrade Over Bluetooth Using External EEPROM
- Hardware Overview 4](https://manuals.plus/wp-content/uploads/2024/03/STSW- DFU-EEPRMA-Device-Firmware-Upgrade-Over-Bluetooth-Using-External-EEPROM- Hardware-Overview-4.png)
Setup & Demo Examples
Setup & Application Examples
HW prerequisites
- 1x BlueNRG-LP or BlueNRG-LPS (STEVAL-IDB011V1/2)
- 1x M95P32 EEPROM expansion board (X-NUCLEO-PGEEZ1 )
- 1x BLE-enabledAndroid™ or iOS™ device
- Laptop/PC with Windows 7, 8 or 10
- 1x USB type A to Micro-B USB cable (BlueNRG-LP), or
- 1x USB type A to Type-C USB cable (BlueNRG-LPS)
- Connecting Wires
Setup & Application Examples
Software and Other prerequisites
-
STSW-DFU-EEPRMA package
-
Download and install STSW-BNRGFLASHER from www.st.com
-
A toolchain to build the firmware
The STSW-DFU-EEPRMA has been developed and tested with- IAR Embedded Workbench for ARM® (EWARM) toolchain + ST-Link
- Real View Microcontroller Development Kit (MDK-ARM) toolchain + ST-LINK
-
ST BLE-Sensor Classic Application, Android (Link), or
-
ST BLE-Sensor Application, iOS (Link)
-
Serial line monitor e.g., Tera term (Windows)
FOTA – Procedure
- The procedure to setup BlueNRG-LP/LPS for FOTA can be divided in these steps:
- Step 1 : Erase complete flash memory
- Step 2 : Program Service Manager
- Step 3 : Perform FOTA
Step1 : Erase Complete Flash Memory
For BlueNRG-LP
- Open EWARM project :
- \STSW-BlueNRG-FOTA\Projects\Applications\BLE_OTA_ServiceM anager\EWARM\STEVAL- IDB011V1\BLE_OTA_ServiceManager.eww
- Go to Project → Download → Erase Memory and click on “OK” on the next popup to confirm erase of flash memory
- This step to be done only once
- Note: User can use any other tool also for complete flash erase
![STSW-DFU-EEPRMA Device Firmware Upgrade Over Bluetooth Using External EEPROM
- fig 1](https://manuals.plus/wp-content/uploads/2024/03/STSW-DFU-EEPRMA- Device-Firmware-Upgrade-Over-Bluetooth-Using-External-EEPROM-fig-1.png)
For BlueNRG-LPS
-
Open EWARM project :
-
.\STSW-BlueNRG-
FOTA\Projects\Applications\BLE_OTA_ServiceM anager\EWARM\STEVAL- IDB012V1\BLE_OTA_ServiceManager.eww -
Go to Project → Download → Erase Memory and click on “OK” on the next popup to confirm erase of flash memory
-
This step to be done only once
-
Note: User can use any other tool also for complete flash erase
![STSW-DFU-EEPRMA Device Firmware Upgrade Over Bluetooth Using External EEPROM
-
fig 2](https://manuals.plus/wp-content/uploads/2024/03/STSW-DFU-EEPRMA- Device-Firmware-Upgrade-Over-Bluetooth-Using-External-EEPROM-fig-2.png) Step 2 : Program Service Manager
-
For BlueNRG-LP
-
Open EWARM project :
-
.\STSW-BlueNRGFOTA\Projects\Applications\BLE_OTA_ServiceMa nager\EWARM\STEVAL- IDB011V1[BLE_OTA_ServiceManager.eww](http://BLE_OTA_ServiceManager.eww)
-
Go to Project → Download → Download active application
-
The following will be printed on UART terminal:
-
OTA Service Manager is programmed successfully
-
Signal | BlueNRG-LP | Jumper J8 on X-NUCLEO-PGEEZ1 |
---|---|---|
SPI1_SCK | PA13 | SCLK |
SPI1_MISO | PA14 | DQ1 |
SPI1_MOSI | PB14 | DQ0 |
CS | PA11 | CS |
The project uses M95P32 External EEPROM mounted on X-NUCLEO-PGEEZ1 for FOTA
service which should be connected to BlueNRG-LP/LPS
Step 2 : Program Service Manager
- For BlueNRG-LPS
- Open EWARM project :
- .\STSW-BlueNRGFOTA\Projects\Applications\BLE_OTA_ServiceMa nager\EWARM\STEVAL- IDB012V1\BLE_OTA_ServiceManager.eww
- Go to Project → Download → Download active application
- The following will be printed on UART terminal:
- OTA Service Manager is programmed successfully
![STSW-DFU-EEPRMA Device Firmware Upgrade Over Bluetooth Using External EEPROM
- fig 4](https://manuals.plus/wp-content/uploads/2024/03/STSW-DFU-EEPRMA- Device-Firmware-Upgrade-Over-Bluetooth-Using-External-EEPROM-fig-4.png)
Signal | BlueNRG-LP | Jumper J8 on X-NUCLEO-PGEEZ1 |
---|---|---|
SPI13_SCK | PB3 | SCLK |
SPI13_MISO | PA8 | DQ1 |
SPI3_MOSI | PB11 | DQ0 |
CS | PA9 | CS |
The project uses M95P32 External EEPROM mounted on X-NUCLEO-PGEEZ1 for FOTA
service which should be connected to BlueNRG-LP/LPS
Step 3 : Perform FOTA (1/4)
- Take any Android or iOS device and launch the application “ST Ble Sensor Classic”
- Download the application from Play/App store if not already installed
- The example application demonstrates different LED toggle which can be selected from the defined macro in preprocessor
BlueNRG-LP | CONFIG_LED_DL2 | CONFIG_LED_DL3 |
---|---|---|
Toggle DL2 with 250ms delay | Toggle DL3 with 1000ms delay | |
BlueNRG-LPS | CONFIG_LED_DL3 | CONFIG_LED_DL4 |
--- | --- | --- |
Toggle DL3 with 250ms delay | Toggle DL4 with 1000ms delay |
- Save the example user application .bin files on the phone
- The binary file is first stored on external M95P32 EEPROM via Bluetooth transfer from phone and then internally copied to flash memory of BlueNRG-LP/LPS
- Here, the steps are demonstrated with an Android phone
Step 3 : Perform FOTA (2/4) Step 3 : Perform FOTA (4/4)
- Wait for user led U5 on BlueNRG-LP/LPS to turn-off which denotes end of FOTA update
- Device resets and application boots up based on the binary flashed
![STSW-DFU-EEPRMA Device Firmware Upgrade Over Bluetooth Using External EEPROM
- fig 8](https://manuals.plus/wp-content/uploads/2024/03/STSW-DFU-EEPRMA- Device-Firmware-Upgrade-Over-Bluetooth-Using-External-EEPROM-fig-8.png)• The sample application demonstrates different LED toggle functionality which can be defined as a macro in preprocessor
FOTA – Application
BlueNRG-LP | CONFIG_LED_DL2 | CONFIG_LED_DL3 |
---|---|---|
Toggle DL2 with 250ms delay | Toggle DL3 with 1000ms delay | |
BlueNRG-LPS | CONFIG_LED_DL3 | CONFIG_LED_DL4 |
--- | --- | --- |
Toggle DL3 with 250ms delay | Toggle DL4 with 1000ms delay |
FOTA – Application FOTA – Flasher Utility
If using a flasher utility tool, then the following steps should be
followed
- Erase complete flash
- Flash BLE_OTA_ServiceManager.bin from address 0x1004 0000
- Flash the required .bin from address 0x1005 7800
Documents & Related Resources
Documents & Related Resources
STSW-DFU-EEPRMA:
• DB5187: Device firmware upgrade over Bluetooth® using external page EEPROM
(M95P32) with BlueNRG-LP or BlueNRG-LPS evaluation board data
brief
X-NUCLEO-PGEEZ1:
Gerber files,
BOM, Schematic
- DB4863: Standard SPI page EEPROM memory expansion board based on M95P32 series for STM32 Nucleo – databrie
- UM3096: Getting started with the X-NUCLEO-PGEEZ1 standard SPI page EEPROM memory expansion board based on M95P32 series for STM32 Nucleo– user manual
All documents are available in the DESIGN tab of the related products webpage.
Documents & Related Resources
STEVAL-IDB011V1:
Gerber files,
BOM, Schematic
- DB4266: Evaluation platform based on BlueNRG-355MC system-on-chip– databrief
- UM2735 : BlueNRG-LP/BlueNRG-LPS development kits– user manual
STEVAL-IDB011V2:
Gerber files,
BOM, Schematic
- DB4617: Evaluation platform based on the BLUENRG-355MC system-on-chip– databrief
- UM2735: BlueNRG-LP/BlueNRG-LPS development kits– user manual
STEVAL-IDB012V1 :
Gerber files,
BOM, Schematic
- DB4694: Evaluation platform based on the BlueNRG-LPS system-on-chip– databrief
- UM2735: BlueNRG-LP/BlueNRG-LPS development kits – user manual
Consult www.st.com for the complete list
Thank you
© 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.
Read User Manual Online (PDF format)
Read User Manual Online (PDF format) >>