STM32WBA Bluetooth® LE – Firmware Update Over The Air

Revision as of 18:16, 8 February 2023 by Registered User

1. Introduction

The Firmware Update Over The Air (FUOTA) is a GATT service used to upgrade a new application while the current one is running.
​ It acts as a GATT Server to be controlled by a GATT Client remote device.​
It is always coupled with a User Application and a dedicated Install Manager Application.

STM32WBA FUOTA

2. Overview

The Firmware Update Over The Air service provides the possibility to receive new application to be installed while the current application is running.
It requires to add the FUOTA Service & Characteristics to the current application.
​ The FUOTA Application allows to:​

  • Download new BLE Application in a Free Area – Download slot​
  • Update/Download new User Configuration file​
  • Jump to the Application Install Manager​

The Application Install Manager allows to:​

  • Replace the BLE Application to be used after reboot​
  • Download user data in any place in the CM33 user flash​

GATT Server memory mapping example:

STM32WBA FUOTA Application Memory Mapping

3. GATT Server Memory mapping description

For the follwing GATT Server memory mapping example:

STM32WBA FUOTA Application Memory Mapping

There are 4 regions with fixed size and address, not modified along firmware update:​

  • One region (page 0 to page 1) that contains the Application Install Manager. This region shall be at the boot address of the CPU out of power on. The Application Install Manager is a full binary with its own vector table.​
  • One region that contains the NVM and User Configuration Data. The address is fixed and can be placed anywhere in the mapping. It is possible to split the NVM from the User Data into several regions at different location in the memory.​
  • 1 Active Slot (from page 2) and 1 Download Slot. They have same size and are placed anywhere in the memory. The Active slot contains the Application (User + OTA) binary whereas the Download slot is used only to store the application update to be applied.​

4. FUOTA Server - Services Structure

FUOTA Server is exported as a Service​ with the following Characteristics with 128 bits UUID:

  • Base Address characteristic:
    ​Used by the Client Application to:
    • Provide Address to store the new application​, an 8K bytes page offset
    • Inform which sectors to erase​
    • Inform the start of the Data Raw transfer (File)​
    • Inform the End of the File Transfer ​
  • Confirmation Characteristic:​
    Used by the Server Application to inform Client device:​
    • it is ready to receive the new binary application​
    • New file is fully received.​
  • Raw Data Characteristic:​
    Used by the Client Application for the File transfer