IMU & Motion
STMicroelectronics LIS3MDL digital twin
3-axis high-performance magnetometer (±4 to ±16 gauss).
VendorSTMicroelectronicsIMU & Motion
InterfaceI2C / SPII2C 0x1C / 0x1E; SPI Mode 0/3
Record Status2026-11-19rev c3f5f9950 (clean tree)
Driver oracle & capability record
Part of the 27-part, 44-case twin-factory oracle suite (44/44 passed, generator 0.1.0+policy.12).
| Driver reference | Twin-factory vendor-driver oracle (0.1.0+policy.12) |
|---|---|
| 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 | accuracy/twin-factory-oracles-2026-11-19b.json (SHA-256 caa6e32e53c5) |
Key registers & reset values
| Address / Field | Register | Reset / Expected | Purpose |
|---|---|---|---|
0x0F | WHO_AM_I | 0x3D | LIS3MDL identifier |
0x20–0x22 | CTRL_REG1..3 | 0x10 / 0x00 / 0x03 | ODR, full-scale and continuous/single mode |
0x28–0x2D | OUT_X_L..OUT_Z_H | 16-bit LE | Magnetic flux density X/Y/Z output |
Attach with ct CLI
Shell - run firmware with LIS3MDL
# Run compiled firmware with LIS3MDL attached on b-u585i-iot02a
ct run --json --board b-u585i-iot02a --device lis3mdl build/app.elf
# Run fault-injection suite and emit JUnit XML
ct test run --json --junit results/lis3mdl.xml tests/lis3mdl-fault.suite.yamlFault-injection test snippet (suite.yaml)
tests/lis3mdl-fault.suite.yaml
version: 1
board: b-u585i-iot02a
firmware: build/app.elf
tests:
- name: lis3mdl-i2c-nack-and-bad-id
faults:
- at_ms: 30
bus: I2C1
kind: nack
address: 0x1E
count: 2
- at_ms: 150
part: lis3mdl
kind: register_override
register: 0x0F
value: 0xFF
expect:
console_contains: "DRIVER_FAULT_DETECTED"
exit_code: 0