Skip to content

MPU-9250

TDK InvenSense MPU-9250 motion sensor: accelerometer, gyroscope and temperature (the AK8963 magnetometer is not modelled).

Live catalog

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

Status at a glance

Aspect Status
Catalog id mpu9250
Bus I²C
Address 0x68 (0x69 with AD0 high)
Source configs/devices/mpu9250.yaml (declarative, no Rust model)
Datasheet TDK InvenSense RM-MPU-9250A-00 rev 1.4 (register map) and PS-MPU-9250A-01 rev 1.0 (sensitivities)
Tier smoke-proven (register-level tests: crates/core/tests/everyday_sensor_set.rs)

Pins / attachment

Pin / net Role
SDA I²C SDA
SCL I²C SCL
VDD/GND Power (digital twin)

Support matrix

Behavior Status Notes
WHO_AM_I 0x71, PWR_MGMT_1 = 0x01 at power-on ✅ Awake from reset, unlike the MPU-6050
14-byte burst 0x3B..0x48 ✅ Accel, TEMP_OUT, gyro; big-endian int16
ACCEL_FS_SEL / GYRO_FS_SEL ✅ Counts per g / per °/s follow the live config
TEMP_OUT ✅ T × 333.87 − 7011.27
INT_STATUS.RAW_DATA_RDY_INT ⚠️ Fixed 1 kHz sample timer; cleared by reading INT_STATUS
H_RESET ✅ Declared registers back to their RM §3 reset values
AK8963 magnetometer (I²C master / bypass at 0x0C) ❌ Not modelled; nothing answers at 0x0C
Sample-rate divider, DLPF, sleep gating, FIFO, DMP, INT pin ❌ Stored or absent

Stimulus

Host inputs: accel_x, accel_y, accel_z (g), gyro_x, gyro_y, gyro_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: "mpu9250"
        type: "mpu9250"
        connection: "i2c0"   # the bus id your chip system uses
    
  2. Agent: labwired_list → labwired_describe id=mpu9250 → wire → labwired_validate → labwired_run / labwired_verify.
  3. Register-level smoke: cargo test -p labwired-core --test everyday_sensor_set — WHO_AM_I 0x71, accel Z 16384 at 1 g, TEMP_OUT 1335 at 25 °C. The same file's negative control proves the check fails against a part that answers only 0x00 or only 0xFF.

Limitations

  • A driver that needs the magnetometer (AK8963 WIA = 0x48) fails, because the twin cannot answer it truthfully.
  • The data-ready timer runs at 1 kHz whatever SMPLRT_DIV / CONFIG say; silicon resets to 8 kHz.

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