Barometer & Pressure

STMicroelectronics LPS22HB in the datasheet corpus

260-1260 hPa piezo-resistive absolute barometer with 24-bit output and FIFO.

standing: provisionalI2C / SPII2C 0x5C/0x5D; SPI Mode 0/3
VendorSTMicroelectronicsBarometer & Pressure
InterfaceI2C / SPII2C 0x5C/0x5D; SPI Mode 0/3
Record StatusCatalog profileDatasheet / behavioral twin

Driver oracle & capability record

Indexed in the CircuitTwin datasheet corpus (pressure class) for STM32 and Zephyr barometer tests.

Driver referenceSTMicroelectronics lps22hb-pid / Zephyr lps22hb
Evidence standingprovisional (register and bus behavior derived from vendor datasheet or driver oracle; not yet hardware-unit verified on two physical samples).
Published recordGenerate or inspect locally via ct twin generate (see /docs/twin-generation).

Key registers & reset values

Address / FieldRegisterReset / ExpectedPurpose
0x0FWHO_AM_I0xB1Fixed ST LPS22HB identifier
0x10CTRL_REG10x00ODR (one-shot to 75 Hz), LPF and BDU control
0x28-0x2APRESS_OUT_XL..H24-bit LEPressure output (4096 LSB/hPa)
0x2B-0x2CTEMP_OUT_L..H16-bit LETemperature output (100 LSB/C)

Attach with ct CLI

Shell - run firmware with LPS22HB
# Run compiled firmware with LPS22HB attached on b-u585i-iot02a
ct run --json --board b-u585i-iot02a --device lps22hb build/app.elf

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

Fault-injection test snippet (suite.yaml)

tests/lps22hb-fault.suite.yaml
version: 1
board: b-u585i-iot02a
firmware: build/app.elf
tests:
  - name: lps22hb-i2c-nack-recovery
    faults:
      - at_ms: 30
        bus: I2C1
        kind: nack
        address: 0x5C
        count: 2
      - at_ms: 140
        part: lps22hb
        kind: register_override
        register: 0x0F
        value: 0xFF
    expect:
      console_contains: "DRIVER_FAULT_HANDLED"
      exit_code: 0

Compatible board twins

More in Barometer & Pressure