Skip to content

HardFOC driver

BNO08x Driver

A C++20 driver for the CEVA BNO080, BNO085 and BNO086 9-axis IMU with on-chip sensor fusion. It starts the SH-2 sensor hub, enables the reports you ask for and hands you quaternions, vectors and events, on any MCU with I2C, SPI or UART.

Quickstart API guide Source on GitHub

The driver has no platform code. You give it a small class that moves bytes over your bus, reports when the hub has data and drives a reset pin; it does the rest: the SH-2 session through CEVA's own SH-2 library, report decoding, re-enabling reports after a hub reset, the UART-RVC frame parser and firmware updates.

9-axis IMU with sensor-fusion hub BNO08x CEVA (formerly Hillcrest Labs)
Sensors
Accelerometer (±8 g), gyroscope (±2000 °/s) and magnetometer, fused on chip by the SH-2 firmware
Outputs
Rotation vectors up to 400 Hz (gyro-integrated up to 1 kHz), calibrated and raw IMU data, steps, taps, activity
Host interface
I2C up to 400 kHz (address 0x4A / 0x4B), SPI mode 3 up to 3 MHz, UART 3 Mbit/s, or UART-RVC 115200
Supply
VDD 2.4 V to 3.6 V (sensors), VDDIO 1.7 V to 3.6 V (core and I/O)
Package
28-pin LGA, 3.8 mm × 5.2 mm × 1.1 mm, −40 °C to 85 °C
Driver modes
SH-2 over I2C, SPI or UART; UART-RVC streaming; firmware update through the bootloader

Datasheet · SH-2 reference manual · SHTP specification

What you get

  • One object per sensor. BNO085<YourPort> covers SH-2 reports, UART-RVC and firmware updates; the port's interface type decides which calls are allowed. See API guide.
  • Every SH-2 report. 40 report types, from rotation vectors and calibrated IMU data to step counter, tap, stability and activity classifiers, decoded into one SensorEvent. See Configuration.
  • Callbacks or polling. Register a callback, or ask HasNewData() and read GetLatest(); both work at once. No threads inside: you call Update().
  • Survives hub resets. When the hub reports a reset, the driver re-enables every report you had configured.
  • UART-RVC and firmware update. Heading, pitch, roll and acceleration at 100 Hz with no protocol stack (UART-RVC mode), and in-field firmware updates through the bootloader (Firmware update).
  • Zero-overhead portability. The port is a CRTP class: no virtual calls, no RTOS dependency. See Porting.
  • Tested without hardware. Host unit tests run the driver against a mock transport, including the datasheet's own RVC frame. See Testing and CI.

Where to go next

  • Quickstart


    Wire the sensor, write the port, print orientation in about 20 lines.

  • Hardware


    Pins, protocol selection, bus settings, start-up timing and power.

  • Architecture


    The layers, the SH-2 library underneath and what each one owns.

  • API guide


    Start, enable reports, read, handle errors, task by task.

  • Porting


    Implement the communication interface for your MCU.

  • API reference


    Every class and member, generated from the headers.