|
BNO08X Driver 0.1.0
API reference
|
BNO08x protocol constants: SHTP channels, SH-2 report, command and record identifiers, the report length table, Q points and the electrical and timing facts the driver relies on. More...
Go to the source code of this file.
Namespaces | |
| namespace | bno08x |
The BNO08x driver: everything it declares lives here; internals in detail. | |
| namespace | bno08x::reg |
| The BNO08x protocol constants. | |
Variables | |
| constexpr uint8_t | bno08x::reg::kChanCommand = 0 |
| SHTP command channel (advertisement, error list). | |
| constexpr uint8_t | bno08x::reg::kChanExecutable = 1 |
| Executable ("device") channel: reset, on, sleep. | |
| constexpr uint8_t | bno08x::reg::kChanControl |
| Sensor hub control: features, product ID, FRS, commands. | |
| constexpr uint8_t | bno08x::reg::kChanInputNormal = 3 |
| Input reports of sensors that are not wake-up. | |
| constexpr uint8_t | bno08x::reg::kChanInputWake = 4 |
| Input reports of wake-up sensors. | |
| constexpr uint8_t | bno08x::reg::kChanGyroRv = 5 |
| Gyro-integrated rotation vector, no report ID. | |
| constexpr std::size_t | bno08x::reg::kChannelCount = 6 |
| Number of channels the driver tracks. | |
| constexpr uint8_t | bno08x::reg::kExecReset = 1 |
| Host to hub: reset the hub. | |
| constexpr uint8_t | bno08x::reg::kExecOn = 2 |
| Host to hub: leave sleep, enable configured sensors. | |
| constexpr uint8_t | bno08x::reg::kExecSleep |
| Host to hub: sleep; only always-on and wake sensors run. | |
| constexpr uint8_t | bno08x::reg::kExecResetComplete = 1 |
| Hub to host: reset complete. | |
| constexpr uint8_t | bno08x::reg::kShtpAdvertise = 0 |
| Command and response 0: advertisement. | |
| constexpr uint8_t | bno08x::reg::kShtpErrorList = 1 |
| Command and response 1: error list. | |
| constexpr uint8_t | bno08x::reg::kShtpErrorCodeMax = 12 |
| Highest defined SHTP error code (Figure 15). | |
| constexpr uint8_t | bno08x::reg::kRepGetFeatureReq = 0xFE |
| Get Feature Request (2 bytes). | |
| constexpr uint8_t | bno08x::reg::kRepSetFeature = 0xFD |
| Set Feature Command (17 bytes). | |
| constexpr uint8_t | bno08x::reg::kRepGetFeatureRsp = 0xFC |
| Get Feature Response (17 bytes). | |
| constexpr uint8_t | bno08x::reg::kRepBaseTimestamp = 0xFB |
| Base Timestamp Reference (5 bytes). | |
| constexpr uint8_t | bno08x::reg::kRepTimestampRebase = 0xFA |
| Timestamp Rebase (5 bytes). | |
| constexpr uint8_t | bno08x::reg::kRepProductIdReq = 0xF9 |
| Product ID Request (2 bytes). | |
| constexpr uint8_t | bno08x::reg::kRepProductIdRsp = 0xF8 |
| Product ID Response (16 bytes). | |
| constexpr uint8_t | bno08x::reg::kRepFrsWriteReq = 0xF7 |
| FRS Write Request (6 bytes). | |
| constexpr uint8_t | bno08x::reg::kRepFrsWriteData = 0xF6 |
| FRS Write Data Request (12 bytes). | |
| constexpr uint8_t | bno08x::reg::kRepFrsWriteRsp = 0xF5 |
| FRS Write Response (4 bytes). | |
| constexpr uint8_t | bno08x::reg::kRepFrsReadReq = 0xF4 |
| FRS Read Request (8 bytes). | |
| constexpr uint8_t | bno08x::reg::kRepFrsReadRsp = 0xF3 |
| FRS Read Response (16 bytes). | |
| constexpr uint8_t | bno08x::reg::kRepCommandReq = 0xF2 |
| Command Request (12 bytes). | |
| constexpr uint8_t | bno08x::reg::kRepCommandRsp = 0xF1 |
| Command Response (16 bytes). | |
| constexpr uint8_t | bno08x::reg::kRepForceFlush = 0xF0 |
| Force Sensor Flush (2 bytes). | |
| constexpr uint8_t | bno08x::reg::kRepFlushDone = 0xEF |
| Flush Completed (2 bytes). | |
| constexpr uint8_t | bno08x::reg::kCmdErrors = 0x01 |
| Report errors. | |
| constexpr uint8_t | bno08x::reg::kCmdCounters = 0x02 |
| Counter commands. | |
| constexpr uint8_t | bno08x::reg::kCmdTare = 0x03 |
| Tare commands. | |
| constexpr uint8_t | bno08x::reg::kCmdInitialize = 0x04 |
| Initialise a subsystem. | |
| constexpr uint8_t | bno08x::reg::kCmdSaveDcd = 0x06 |
| Save the dynamic calibration data. | |
| constexpr uint8_t | bno08x::reg::kCmdMeCal = 0x07 |
| Motion engine calibration enables. | |
| constexpr uint8_t | bno08x::reg::kCmdPeriodicDcd = 0x09 |
| Periodic DCD save on or off. | |
| constexpr uint8_t | bno08x::reg::kCmdOscillator = 0x0A |
| Oscillator type. | |
| constexpr uint8_t | bno08x::reg::kCmdClearDcdReset = 0x0B |
| Clear DCD and reset. | |
| constexpr uint8_t | bno08x::reg::kCmdSimpleCal = 0x0C |
| Simple calibration start and finish. | |
| constexpr uint8_t | bno08x::reg::kCmdBootloader = 0x0D |
| Bootloader (FSP200 only; never sent). | |
| constexpr uint8_t | bno08x::reg::kCmdInteractiveCal |
| Interactive calibration motion intent (BNO086). | |
| constexpr uint8_t | bno08x::reg::kCmdWheel = 0x0F |
| Wheel request (dead reckoning input). | |
| constexpr uint8_t | bno08x::reg::kCmdUnsolicited |
| Bit 7 of a response's command: autonomous response. | |
| constexpr std::size_t | bno08x::reg::kLenGetFeature = 17 |
| Set Feature and Get Feature Response. | |
| constexpr std::size_t | bno08x::reg::kLenProductId = 16 |
| Product ID Response. | |
| constexpr std::size_t | bno08x::reg::kLenCommand = 12 |
| Command Request. | |
| constexpr std::size_t | bno08x::reg::kLenCommandRsp = 16 |
| Command Response. | |
| constexpr std::size_t | bno08x::reg::kLenFrsWriteReq = 6 |
| FRS Write Request. | |
| constexpr std::size_t | bno08x::reg::kLenFrsWriteData = 12 |
| FRS Write Data Request. | |
| constexpr std::size_t | bno08x::reg::kLenFrsWriteRsp = 4 |
| FRS Write Response. | |
| constexpr std::size_t | bno08x::reg::kLenFrsReadReq = 8 |
| FRS Read Request. | |
| constexpr std::size_t | bno08x::reg::kLenFrsReadRsp = 16 |
| FRS Read Response. | |
| constexpr std::size_t | bno08x::reg::kLenTimestamp = 5 |
| Base Timestamp and Rebase. | |
| constexpr std::size_t | bno08x::reg::kLenGyroRv = 14 |
| Gyro-integrated rotation vector (channel 5). | |
| constexpr std::size_t | bno08x::reg::kLenSensorHeader = 4 |
| Report ID, sequence, status, delay. | |
| constexpr std::size_t | bno08x::reg::kShtpHeaderLen = 4 |
| SHTP header: length (2), channel, sequence. | |
| constexpr uint8_t | bno08x::reg::kFlagRelative = 0x01 |
| Bit 0: change sensitivity is relative. | |
| constexpr uint8_t | bno08x::reg::kFlagChangeEnable = 0x02 |
| Bit 1: change sensitivity enabled. | |
| constexpr uint8_t | bno08x::reg::kFlagWake = 0x04 |
| Bit 2: wake-up sensor. | |
| constexpr uint8_t | bno08x::reg::kFlagAlwaysOn = 0x08 |
| Bit 3: always-on sensor. | |
| constexpr uint16_t | bno08x::reg::kFrsStaticCalAgm = 0x7979 |
| Static calibration AGM (proprietary). | |
| constexpr uint16_t | bno08x::reg::kFrsNominalCalAgm = 0x4D4D |
| Nominal calibration AGM (read only). | |
| constexpr uint16_t | bno08x::reg::kFrsStaticCalSra = 0x8A8A |
| Static calibration SRA (proprietary). | |
| constexpr uint16_t | bno08x::reg::kFrsNominalCalSra = 0x4E4E |
| Nominal calibration SRA (read only). | |
| constexpr uint16_t | bno08x::reg::kFrsDynamicCal = 0x1F1F |
| Dynamic calibration data (DCD). | |
| constexpr uint16_t | bno08x::reg::kFrsPowerManagement |
| MotionEngine power management, stability. | |
| constexpr uint16_t | bno08x::reg::kFrsSystemOrientation = 0x2D3E |
| System orientation quaternion. | |
| constexpr uint16_t | bno08x::reg::kFrsPrimaryAccelOrientation |
| Primary accelerometer orientation. | |
| constexpr uint16_t | bno08x::reg::kFrsScreenAccelOrientation |
| Screen rotation accelerometer orientation. | |
| constexpr uint16_t | bno08x::reg::kFrsGyroOrientation = 0x2D46 |
| Gyroscope orientation. | |
| constexpr uint16_t | bno08x::reg::kFrsMagOrientation = 0x2D4C |
| Magnetometer orientation. | |
| constexpr uint16_t | bno08x::reg::kFrsArvrRotationVector |
| AR/VR stabilisation, rotation vector. | |
| constexpr uint16_t | bno08x::reg::kFrsArvrGameRotationVector |
| AR/VR stabilisation, game rotation vector. | |
| constexpr uint16_t | bno08x::reg::kFrsSignificantMotion |
| Significant motion detector configuration. | |
| constexpr uint16_t | bno08x::reg::kFrsShake = 0x7D7D |
| Shake detector configuration. | |
| constexpr uint16_t | bno08x::reg::kFrsMaxFusionPeriod = 0xD7D7 |
| Maximum fusion period. | |
| constexpr uint16_t | bno08x::reg::kFrsSerialNumber = 0x4B4B |
| Serial number. | |
| constexpr uint16_t | bno08x::reg::kFrsEnvPressureCal = 0x39AF |
| Environmental calibration: pressure. | |
| constexpr uint16_t | bno08x::reg::kFrsEnvTemperatureCal |
| Environmental calibration: temperature. | |
| constexpr uint16_t | bno08x::reg::kFrsEnvHumidityCal = 0x1AC9 |
| Environmental calibration: humidity. | |
| constexpr uint16_t | bno08x::reg::kFrsEnvAmbientLightCal |
| Environmental calibration: ambient light. | |
| constexpr uint16_t | bno08x::reg::kFrsEnvProximityCal = 0x4DA2 |
| Environmental calibration: proximity. | |
| constexpr uint16_t | bno08x::reg::kFrsAlsCal = 0xD401 |
| ALS calibration (device specific). | |
| constexpr uint16_t | bno08x::reg::kFrsProximityCal |
| Proximity sensor calibration (device specific). | |
| constexpr uint16_t | bno08x::reg::kFrsPickupConfig = 0x1B2A |
| Pickup detector configuration. | |
| constexpr uint16_t | bno08x::reg::kFrsFlipConfig = 0xFC94 |
| Flip detector configuration. | |
| constexpr uint16_t | bno08x::reg::kFrsStabilityDetectorConfig |
| Stability detector configuration. | |
| constexpr uint16_t | bno08x::reg::kFrsActivityConfig = 0xED88 |
| Activity tracker configuration. | |
| constexpr uint16_t | bno08x::reg::kFrsSleepConfig = 0xED87 |
| Sleep detector configuration. | |
| constexpr uint16_t | bno08x::reg::kFrsTiltConfig = 0xED89 |
| Tilt detector configuration. | |
| constexpr uint16_t | bno08x::reg::kFrsPocketConfig = 0xEF27 |
| Pocket detector configuration. | |
| constexpr uint16_t | bno08x::reg::kFrsCircleConfig = 0xEE51 |
| Circle detector configuration. | |
| constexpr uint16_t | bno08x::reg::kFrsUserRecord = 0x74B4 |
| User record, up to 64 words. | |
| constexpr uint16_t | bno08x::reg::kFrsTimeSource = 0xD403 |
| MotionEngine time source selection. | |
| constexpr uint16_t | bno08x::reg::kFrsUartFormat = 0xA1A1 |
| UART output format (RVC). | |
| constexpr uint16_t | bno08x::reg::kFrsGyroRvConfig |
| Gyro-integrated rotation vector configuration. | |
| constexpr uint16_t | bno08x::reg::kFrsFusionControl = 0xA1A3 |
| Fusion control flags. | |
| constexpr uint16_t | bno08x::reg::kFrsSimpleCalConfig |
| Simple calibration configuration (proprietary). | |
| constexpr uint16_t | bno08x::reg::kFrsSimpleCalNominal |
| Simple calibration nominal (proprietary). | |
| constexpr uint16_t | bno08x::reg::kFrsMetadataFirst |
| First sensor metadata record (raw accelerometer). | |
| constexpr uint16_t | bno08x::reg::kFrsMetadataLast |
| Last sensor metadata record (motion request). | |
| constexpr std::size_t | bno08x::reg::kUserRecordWords = 64 |
| Largest user record, in 32-bit words. | |
| constexpr uint8_t | bno08x::reg::kFrsWWordsReceived = 0 |
| Write status: word(s) received. | |
| constexpr uint8_t | bno08x::reg::kFrsWUnrecognised = 1 |
| Write status: unrecognised FRS type. | |
| constexpr uint8_t | bno08x::reg::kFrsWBusy = 2 |
| Write status: busy. | |
| constexpr uint8_t | bno08x::reg::kFrsWCompleted = 3 |
| Write status: write completed. | |
| constexpr uint8_t | bno08x::reg::kFrsWReady = 4 |
| Write status: write mode entered or ready. | |
| constexpr uint8_t | bno08x::reg::kFrsWFailed = 5 |
| Write status: write failed. | |
| constexpr uint8_t | bno08x::reg::kFrsWNotInWriteMode = 6 |
| Write status: data while not in write mode. | |
| constexpr uint8_t | bno08x::reg::kFrsWInvalidLength = 7 |
| Write status: invalid length. | |
| constexpr uint8_t | bno08x::reg::kFrsWRecordValid = 8 |
| Write status: record valid. | |
| constexpr uint8_t | bno08x::reg::kFrsWRecordInvalid = 9 |
| Write status: record invalid. | |
| constexpr uint8_t | bno08x::reg::kFrsWDeviceError = 10 |
| Write status: device error (deprecated). | |
| constexpr uint8_t | bno08x::reg::kFrsWReadOnly = 11 |
| Write status: record is read only. | |
| constexpr uint8_t | bno08x::reg::kFrsWMemoryFull = 12 |
| Write status: FRS memory is full. | |
| constexpr uint8_t | bno08x::reg::kFrsRNoError = 0 |
| Read status: no error. | |
| constexpr uint8_t | bno08x::reg::kFrsRUnrecognised = 1 |
| Read status: unrecognised FRS type. | |
| constexpr uint8_t | bno08x::reg::kFrsRBusy = 2 |
| Read status: busy. | |
| constexpr uint8_t | bno08x::reg::kFrsRCompleted = 3 |
| Read status: read record completed. | |
| constexpr uint8_t | bno08x::reg::kFrsREmpty = 5 |
| Read status: record empty. | |
| constexpr uint8_t | bno08x::reg::kFrsRDeviceError = 8 |
| Read status: device error. | |
| constexpr uint8_t | bno08x::reg::kCalAccel = 0x01 |
| Accelerometer calibration. | |
| constexpr uint8_t | bno08x::reg::kCalGyro = 0x02 |
| Gyroscope calibration. | |
| constexpr uint8_t | bno08x::reg::kCalMag = 0x04 |
| Magnetometer calibration. | |
| constexpr uint8_t | bno08x::reg::kCalPlanar = 0x08 |
| Planar accelerometer calibration. | |
| constexpr uint8_t | bno08x::reg::kCalOnTable = 0x10 |
| On-table calibration. | |
| constexpr uint8_t | bno08x::reg::kI2cAddrLow = 0x4A |
| 7-bit I2C address with SA0 low (DS p14). | |
| constexpr uint8_t | bno08x::reg::kI2cAddrHigh = 0x4B |
| 7-bit I2C address with SA0 high. | |
| constexpr uint8_t | bno08x::reg::kBootI2cAddrLow |
| Bootloader I2C address, SA0 low (DS p29; unused). | |
| constexpr uint8_t | bno08x::reg::kBootI2cAddrHigh = 0x29 |
| Bootloader I2C address, SA0 high (unused). | |
| constexpr uint32_t | bno08x::reg::kI2cMaxHz = 400'000 |
| Highest I2C clock (DS p46). | |
| constexpr uint32_t | bno08x::reg::kSpiMaxHz = 3'000'000 |
| Highest SPI clock, mode 3 (DS p19, p47). | |
| constexpr uint32_t | bno08x::reg::kUartShtpBaud = 3'000'000 |
| UART-SHTP rate, 8N1 (DS p17). | |
| constexpr uint32_t | bno08x::reg::kUartRvcBaud = 115'200 |
| UART-RVC rate, 8N1 (DS p20). | |
| constexpr uint32_t | bno08x::reg::kUartHostByteGapUs |
| Minimum gap between bytes from the host (SHTP S4.5). | |
| constexpr uint32_t | bno08x::reg::kResetPulseMinNs = 10 |
| Shortest NRST pulse (DS p47). | |
| constexpr uint32_t | bno08x::reg::kStartupT1Ms |
| Internal initialisation after reset, at least (DS p47). | |
| constexpr uint32_t | bno08x::reg::kStartupT2Ms = 4 |
| Internal configuration, about (DS p47). | |
| constexpr uint32_t | bno08x::reg::kWakeTypicalUs = 150 |
| WAKE assert to H_INTN assert, typical (DS p48). | |
| constexpr uint32_t | bno08x::reg::kHintHostTimeoutMs |
| Hub-side wait for the host after H_INTN (DS p19). | |
| constexpr std::size_t | bno08x::reg::kRvcFrameLen = 19 |
| UART-RVC frame length (DS p21). | |
| constexpr uint32_t | bno08x::reg::kRvcRateHz = 100 |
| UART-RVC frame rate (DS p20). | |
| constexpr uint32_t | bno08x::reg::kReportRateMinPct |
| A request is served at 0.9 x or more (DS p50). | |
| constexpr uint32_t | bno08x::reg::kReportRateMaxPct = 210 |
| and at 2.1 x or less (DS p50). | |
| constexpr uint32_t | bno08x::reg::kDelayTickUs |
| Unit of the delay field and the timestamps (RM S7.2). | |
| constexpr uint32_t | bno08x::reg::kSupplyVddMinMv = 2400 |
| VDD minimum (DS p45). | |
| constexpr uint32_t | bno08x::reg::kSupplyVddMaxMv = 3600 |
| VDD maximum (DS p45). | |
| constexpr uint32_t | bno08x::reg::kSupplyVddioMinMv |
| VDDIO minimum (DS p45; pin table says 1650). | |
| constexpr uint32_t | bno08x::reg::kSupplyVddioMaxMv = 3600 |
| VDDIO maximum (DS p45). | |
BNO08x protocol constants: SHTP channels, SH-2 report, command and record identifiers, the report length table, Q points and the electrical and timing facts the driver relies on.
The BNO08x has no register map: the host talks SHTP (framing) and SH-2 (reports, commands, records). Section and page numbers are the printed ones of the CEVA documents: DS = BNO080/BNO085/ BNO086 data sheet 1000-3927, RM = SH-2 Reference Manual 1000-3625, SHTP = Sensor Hub Transport Protocol 1000-3535, SHU = SH-2 SHTP Reference Manual 1000-3600. All multi-byte values are little-endian.