Skip to content

BMI160

Bosch BMI160 6-axis IMU (accelerometer + gyroscope + temperature) over I²C.

Live catalog

Prefer labwired_describe with the catalog id over guessing pins or addresses.

Status at a glance

Aspect Status
Catalog id bmi160
Bus I²C
Address 0x68 (SDO→GND); 0x69 SDO→VDDIO
Datasheet Bosch BMI160 BST-BMI160-DS000-09 rev 1.0: §2.11 register map (Figure 20), §2.11.3, §2.11.8, §2.11.38, Tables 2/3, §3.2.3
Source configs/devices/bmi160.yaml (declarative, no Rust model)
Tier smoke-proven (register-level tests: crates/core/tests/parts_batch5.rs)

Pins / attachment

Pin / net Role
SDA / SCL I²C
INT1 / INT2 Not modelled
SDO Address select
VDD/VDDIO/GND Power (digital twin)

Support matrix

Behavior Status Notes
CHIP_ID 0xD1, register reset values ✅
CMD acc/gyr PMU modes → PMU_STATUS, STATUS drdy ✅ Immediate
ACC / GYR int16 LE scaled by ACC_RANGE / GYR_RANGE ✅ Read 0 while suspended
TEMPERATURE (T−23)·512, 0x8000 unless gyro normal ✅
Softreset 0xB6 ✅
FIFO, interrupts, aux magnetometer, sensor time, SPI ❌

Stimulus

Host inputs: accel_x/y/z (g), gyro_x/y/z (°/s), temperature (°C).

How to run

  1. Place the part and an MCU in Playground, or add it to a system YAML:
    external_devices:
      - id: "bmi160"
        type: "bmi160"
        connection: "i2c1"
    
  2. Agent: labwired_list → labwired_describe id=bmi160 → wire → labwired_validate → labwired_run / labwired_verify.
  3. Register-level smoke: cargo test -p labwired-core --test parts_batch5 — CHIP_ID, suspended data/temperature, then CMD 0x11/0x15 and 1 g on Z; bmi160_scales_with_range_and_softreset_restores_defaults covers range scaling, the temperature gate and softreset. The same file's negative control proves the check fails against a stand-in that answers only 0x00 or only 0xFF.

Limitations

  • drdy bits do not clear on a data read; data is always fresh.
  • PMU switch times (Table 24) are not modelled.

See the YAML header for the full datasheet trace and every named approximation.