12.3.1 BLE OTA DFU Firmware Architecture

The following figure illustrates the BLE OTA DFU Firmware Architecture of PIC32CXBZ2/WBZ451 device.

Figure 12-35. BLE OTA DFU Firmware Architecture
  • MCHP OTA Profile and Service Middleware:

    • Defines and handles the MCHP defined BLE GATT Server and Profile for getting the upgradable image over BLE link.

    • Implements OTA state management and error handling.

    • Implements defragmentation and decryption of received new image.

  • DFU Middleware:

    • DFU APIs for writing the OTA image into Embedded Flash.

    • This module provides Device Firmware Update (DFU) capabilities common across the different supported transport mediums like UART, BLE

  • OTA Event Handling

    • OTA events from "MCHP OTA Profile and Service" middleware is sent to application for DFU permission.

  • OTA DFU Encryption Key management:

    • Trigger new Flash Image authentication by calling Bootloader API.

    • Timeout handling in case of failure/error while receiving the image.

  • Bootloader:

    • Bootloader is responsible for authentication and activation of new firmware, booting into the application, optionally entering into Serial DFU mode to get new image over serial interface.
      Note: Bootloader code is running from Boot Flash inPIC32CXBZ2/WBZ451 family of devices. So, it is not immutable.
Figure 12-36. BLE OTA DFU Firmware Architecture - H3 Code.