IMU & Motion
STMicroelectronics LIS2DH12 in the datasheet corpus
Ultra-low-power 3-axis MEMS accelerometer with 32-level FIFO and tap/free-fall interrupts.
VendorSTMicroelectronicsIMU & Motion
InterfaceI2C / SPII2C 0x18/0x19; SPI Mode 0/3
Record StatusCatalog profileDatasheet / behavioral twin
Driver oracle & capability record
Used on BBC micro:bit v2 Zephyr builds in the CircuitTwin confidence registry and indexed in the datasheet corpus.
| Driver reference | Zephyr lis2dh driver / ST lis2dh12-pid |
|---|---|
| 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 |
|---|---|---|---|
0x0F | WHO_AM_I | 0x33 | Fixed ST accelerometer chip ID |
0x20 | CTRL_REG1 | 0x07 | ODR [7:4], LPen and X/Y/Z axis enables |
0x23 | CTRL_REG4 | 0x00 | BDU, full-scale (2g..16g) and HR mode |
0x28-0x2D | OUT_X_L..OUT_Z_H | Left-justified | X, Y, Z acceleration words (MSB=1 auto-inc on I2C) |
Attach with ct CLI
Shell - run firmware with LIS2DH12
# Run compiled firmware with LIS2DH12 attached on microbit-v2
ct run --json --board microbit-v2 --device lis2dh12 build/app.elf
# Run fault-injection suite and emit JUnit XML
ct test run --json --junit results/lis2dh12.xml tests/lis2dh12-fault.suite.yamlFault-injection test snippet (suite.yaml)
tests/lis2dh12-fault.suite.yaml
version: 1
board: microbit-v2
firmware: build/app.elf
tests:
- name: lis2dh12-i2c-nack-recovery
faults:
- at_ms: 30
bus: I2C1
kind: nack
address: 0x19
count: 2
- at_ms: 140
part: lis2dh12
kind: register_override
register: 0x0F
value: 0xFF
expect:
console_contains: "DRIVER_FAULT_HANDLED"
exit_code: 0