Barometer & Pressure

# STMicroelectronics LPS22HB in the datasheet corpus

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

standing: provisional I2C / SPI I2C 0x5C/0x5D; SPI Mode 0/3

Vendor STMicroelectronics Barometer & Pressure

Interface I2C / SPI I2C 0x5C/0x5D; SPI Mode 0/3

Record Status Catalog profile Datasheet / behavioral twin

## Driver oracle & capability record

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

| Driver reference  | STMicroelectronics lps22hb-pid / Zephyr lps22hb                                                                                                 |
| ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| Evidence standing | provisional (register and bus behavior derived from vendor datasheet or driver oracle; not yet hardware-unit verified on two physical samples). |
| Published record  | Generate or inspect locally via ct twin generate (see [/docs/twin-generation](https://circuittwin.ai/docs/twin-generation)).                    |

## Key registers & reset values

| Address / Field | Register          | Reset / Expected | Purpose                                      |
| --------------- | ----------------- | ---------------- | -------------------------------------------- |
| 0x0F            | WHO\_AM\_I        | 0xB1             | Fixed ST LPS22HB identifier                  |
| 0x10            | CTRL\_REG1        | 0x00             | ODR (one-shot to 75 Hz), LPF and BDU control |
| 0x28-0x2A       | PRESS\_OUT\_XL..H | 24-bit LE        | Pressure output (4096 LSB/hPa)               |
| 0x2B-0x2C       | TEMP\_OUT\_L..H   | 16-bit LE        | Temperature 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

[Board: b-u585i-iot02a](https://circuittwin.ai/boards/b-u585i-iot02a) [Board: nucleo-l476rg](https://circuittwin.ai/boards/nucleo-l476rg) [Board: nucleo-f411re](https://circuittwin.ai/boards/nucleo-f411re) [Accuracy report](https://circuittwin.ai/docs/accuracy)

## More in Barometer & Pressure

[BMP280 (Bosch)](https://circuittwin.ai/twins/bmp280) [BMP388 (Bosch)](https://circuittwin.ai/twins/bmp388) [BMP390 (Bosch)](https://circuittwin.ai/twins/bmp390) [DPS310 (Infineon)](https://circuittwin.ai/twins/dps310) [MS5611 (TE)](https://circuittwin.ai/twins/ms5611)

> ## Inject LPS22HB bus faults in CI
>
> Wire LPS22HB onto your MCU board twin, drive physical stimuli and fail builds when your driver hangs on NACKs or frozen registers.
>
> [Start now](https://app.circuittwin.ai/try) [Inputs & fault injection docs](https://circuittwin.ai/docs/inputs) [Connect a coding agent](https://circuittwin.ai/docs/agents)
