BNO08X Driver 0.1.0
API reference
Loading...
Searching...
No Matches
Namespaces
bno08x_spi_interface.hpp File Reference

What the BNO08x needs from the SPI bus (handbook KB-CPP-123); the port itself is in bno08x_interface.hpp. More...

#include <cstdint>

Go to the source code of this file.

Namespaces

namespace  bno08x
 The BNO08x driver: everything it declares lives here; internals in detail.
 

Variables

Bus requirements

A port checks its settings against these with static_assert.

constexpr uint8_t bno08x::spi::kSpiMode = 3
 SPI mode 3: SCK idles high, data is sampled on the second edge, DS p19.
 
constexpr bool bno08x::spi::kMsbFirst = true
 Each byte is clocked most significant bit first.
 
constexpr uint32_t bno08x::spi::kMaxClockHz = 3'000'000
 The highest SCK frequency, DS p19.
 
constexpr uint32_t bno08x::spi::kMinCsHighNs = 1'000
 
constexpr uint32_t bno08x::spi::kCsSetupNs = 100
 CS low to the first clock edge, minimum (0.1 us as printed), DS p47.
 
constexpr uint32_t bno08x::spi::kCsHoldNs = 17
 The last clock edge to CS high, minimum (16.83 ns as printed), DS p47.
 
constexpr bool bno08x::spi::kContinuousWord = true
 One duplex transfer of any length per CS assertion: CS stays low for the whole transfer.
 

Detailed Description

What the BNO08x needs from the SPI bus (handbook KB-CPP-123); the port itself is in bno08x_interface.hpp.

Variable Documentation

◆ kMinCsHighNs

constexpr uint32_t bno08x::spi::kMinCsHighNs = 1'000
inlineconstexpr

The data sheet gives no CS high time; the hub needs at least 1 us between two H_INTN assertions, so keep CS high that long.