Current, Power & ADC

Texas Instruments INA219 digital twin

26 V bidirectional high-side current, shunt and bus voltage monitor.

standing: provisionalI2C (I2C1 on nucleo-f767zi)0x40–0x4F (default 0x40)
VendorTexas InstrumentsCurrent, Power & ADC
InterfaceI2C0x40–0x4F (default 0x40)
Record Status2026-11-21rev 287d49a4a (clean tree)

Driver oracle & capability record

Driver oracle PASS: 7/7 stages passed on nucleo-f767zi; generator 0.1.0+policy.12.

Driver referencelibdriver/ina219 driver (commit 266a1ee32) (MIT)
Evidence standingprovisional (register and bus behavior derived from vendor datasheet or driver oracle; not yet hardware-unit verified on two physical samples).
Datasheet accuracy basisbus 1 LSB = 4 mV; shunt offset +/-200 uV (PGA /8) + 0.5 % current error + 10 uV LSB; current 0.5 % + 200 uV / 0.1 ohm (SBOS448G)
Negative controlstimulus outside the datasheet tolerance -> oracle FAIL
Published recordaccuracy/driver-oracles-2026-11-21.json (SHA-256 dd20a19b84c9)

Measured driver round-trip results

QuantityMeasuredExpectedErrorDatasheet Tolerance
BUS_mV5000 mV5000 mV0 mV±4 mV
SHUNT_uV20000 uV20000 uV0 uV±310 uV
CURRENT_mA199 mA200 mA-1 mA±3 mA

Key registers & reset values

Address / FieldRegisterReset / ExpectedPurpose
0x00CONFIG0x399FBus range, PGA gain, ADC resolution and mode
0x01SHUNT_V10 uV/LSBSigned shunt voltage reading
0x02BUS_V4 mV/LSBBus voltage plus CNVR and OVF flags
0x04 / 0x05CURRENT / CALIB0x0000Scaled current register and calibration factor

Attach with ct CLI

Shell - run firmware with INA219
# Run compiled firmware with INA219 attached on nucleo-f767zi
ct run --json --board nucleo-f767zi --device ina219 build/app.elf

# Run fault-injection suite and emit JUnit XML
ct test run --json --junit results/ina219.xml tests/ina219-fault.suite.yaml

Fault-injection test snippet (suite.yaml)

tests/ina219-fault.suite.yaml
version: 1
board: nucleo-f767zi
firmware: build/app.elf
tests:
  - name: ina219-i2c-nack-and-bad-id
    faults:
      - at_ms: 30
        bus: I2C1
        kind: nack
        address: 0x40
        count: 2
      - at_ms: 150
        part: ina219
        kind: register_override
        register: 0x00
        value: 0xFF
    expect:
      console_contains: "DRIVER_FAULT_DETECTED"
      exit_code: 0

Compatible board twins

More in Current, Power & ADC