Environment & Temperature
Sensirion SHT40 in the datasheet corpus
4th-gen ±0.2 C / ±1.8 %RH I2C humidity and temperature sensor with CRC-8 and on-chip heater.
VendorSensirionEnvironment & Temperature
InterfaceI2C0x44 (or 0x45 / 0x46 variants)
Record StatusCatalog profileDatasheet / behavioral twin
Driver oracle & capability record
Indexed in the CircuitTwin datasheet corpus; command-based single-byte opcodes with Sensirion poly 0x31 CRC-8 framing.
| Driver reference | Sensirion embedded-i2c-sht4x / Zephyr sht4x |
|---|---|
| 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). |
Key registers & reset values
| Address / Field | Register | Reset / Expected | Purpose |
|---|---|---|---|
0xFD | MEAS_HIGH_PREC | 6-byte frame | High-precision temp + CRC8 + RH + CRC8 readout |
0x89 | READ_SERIAL | 6-byte frame | Returns 32-bit unique serial number with two CRC-8 bytes |
0x94 | SOFT_RESET | 1 ms reset | Soft reset command |
0x39 | HEATER_200MW_1S | Heater pulse | Activates condensation-removal heater before reading |
Attach with ct CLI
Shell - run firmware with SHT40
# Run compiled firmware with SHT40 attached on nucleo-g071rb
ct run --json --board nucleo-g071rb --device sht40 build/app.elf
# Run fault-injection suite and emit JUnit XML
ct test run --json --junit results/sht40.xml tests/sht40-fault.suite.yamlFault-injection test snippet (suite.yaml)
tests/sht40-fault.suite.yaml
version: 1
board: nucleo-g071rb
firmware: build/app.elf
tests:
- name: sht40-i2c-nack-recovery
faults:
- at_ms: 30
bus: I2C1
kind: nack
address: 0x44
count: 2
- at_ms: 140
part: sht40
kind: frozen_reading
expect:
console_contains: "DRIVER_FAULT_HANDLED"
exit_code: 0