HF-BNO08x  0.1.0-dev
Loading...
Searching...
No Matches
dfu_example.cpp File Reference

Device Firmware Update (DFU) example for BNO08x. More...

#include "esp_log.h"
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include <memory>
#include <stdio.h>
#include "../../../inc/bno08x.hpp"
#include "../../../src/dfu/MemoryFirmware.hpp"
#include "esp32_bno08x_bus.hpp"
Include dependency graph for dfu_example.cpp:

Functions

void app_main (void)
 

Detailed Description

Device Firmware Update (DFU) example for BNO08x.

This example demonstrates:

  • Entering BNO08x bootloader mode via BOOTN pin
  • Performing a firmware update using BNO085::Dfu()
  • Using MemoryFirmware for runtime-provided firmware images

IMPORTANT HARDWARE NOTES:

  • DFU requires the BOOTN pin to be wired and active (active-low)
  • The default esp32_bno08x_bus.hpp does NOT wire BOOTN. To use DFU, you must modify SetBoot() in esp32_bno08x_bus.hpp to drive a real GPIO.
  • The sensor must be reset while BOOTN is held low to enter bootloader mode.
  • The default firmware stub (firmware-bno.c) contains dummy data. Replace it with a real firmware binary for actual updates.
Note
This example runs independently on an I2C bus that only communicates with the BNO08x device. The I2C bus setup (GPIO4 SDA, GPIO5 SCL) mirrors the other BNO08x examples for pin consistency.
Author
Nebiyu Tadesse
Date
2025

Function Documentation

◆ app_main()

void app_main ( void )