IMU & Motion

# Analog Devices ADXL345 digital twin

3-axis ±2g/±4g/±8g/±16g digital MEMS accelerometer.

standing: provisional I2C / SPI (I2C1 on nucleo-f767zi) I2C 0x53 (ALT=0) or 0x1D; SPI Mode 3

Vendor Analog Devices IMU & Motion

Interface I2C / SPI I2C 0x53 (ALT=0) or 0x1D; SPI Mode 3

Record Status 2026-11-21 rev 287d49a4a (clean tree)

## Driver oracle & capability record

Driver oracle PASS: 7/7 stages passed on nucleo-f767zi; generator 0.1.0+policy.12.

| Driver reference         | [libdriver/adxl345 driver (commit b15a89852)](https://github.com/libdriver/adxl345) (MIT)                                                       |
| ------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| Evidence standing        | provisional (register and bus behavior derived from vendor datasheet or driver oracle; not yet hardware-unit verified on two physical samples). |
| Datasheet accuracy basis | sensitivity deviation from ideal +/-1 %, 0 g deviation +/-35 mg (X, Y) / +/-40 mg (Z) (Rev. G Table 1)                                          |
| Negative control         | stimulus outside the datasheet tolerance -> oracle FAIL                                                                                         |
| Published record         | [accuracy/driver-oracles-2026-11-21.json](https://circuittwin.ai/evidence/accuracy/driver-oracles-2026-11-21.json) (SHA-256 dd20a19b84c9)       |

## Measured driver round-trip results

| Quantity     | Measured | Expected | Error  | Datasheet Tolerance |
| ------------ | -------- | -------- | ------ | ------------------- |
| ACCEL\_X\_mg | 499 mg   | 500 mg   | \-1 mg | ±40 mg              |
| ACCEL\_Y\_mg | 0 mg     | 0 mg     | 0 mg   | ±35 mg              |
| ACCEL\_Z\_mg | 998 mg   | 1000 mg  | \-2 mg | ±50 mg              |

## Key registers & reset values

| Address / Field | Register       | Reset / Expected | Purpose                               |
| --------------- | -------------- | ---------------- | ------------------------------------- |
| 0x00            | DEVID          | 0xE5             | Fixed Analog Devices chip identifier  |
| 0x2D            | POWER\_CTL     | 0x00             | Measure bit (bit 3) enables sampling  |
| 0x31            | DATA\_FORMAT   | 0x00             | FULL\_RES and g-range selection       |
| 0x32–0x37       | DATAX0..DATAZ1 | 16-bit LE        | X, Y, Z acceleration output registers |

## Attach with ct CLI

Shell - run firmware with ADXL345

```
# Run compiled firmware with ADXL345 attached on nucleo-f767zi
ct run --json --board nucleo-f767zi --device adxl345 build/app.elf

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

## Fault-injection test snippet (suite.yaml)

tests/adxl345-fault.suite.yaml

```
version: 1
board: nucleo-f767zi
firmware: build/app.elf
tests:
  - name: adxl345-i2c-nack-and-bad-id
    faults:
      - at_ms: 30
        bus: I2C1
        kind: nack
        address: 0x53
        count: 2
      - at_ms: 150
        part: adxl345
        kind: register_override
        register: 0x00
        value: 0xFF
    expect:
      console_contains: "DRIVER_FAULT_DETECTED"
      exit_code: 0
```

## Compatible board twins

[Board: nucleo-f767zi](https://circuittwin.ai/boards/nucleo-f767zi) [Board: nucleo-f411re](https://circuittwin.ai/boards/nucleo-f411re) [Board: feather-nrf52832](https://circuittwin.ai/boards/feather-nrf52832) [Accuracy report](https://circuittwin.ai/docs/accuracy)

## More in IMU & Motion

[ADXL355 (Analog)](https://circuittwin.ai/twins/adxl355) [AS5600 (ams)](https://circuittwin.ai/twins/as5600) [BMI088 (Bosch)](https://circuittwin.ai/twins/bmi088) [BMI160 (Bosch)](https://circuittwin.ai/twins/bmi160) [BMI270 (Bosch)](https://circuittwin.ai/twins/bmi270) [BMM150 (Bosch)](https://circuittwin.ai/twins/bmm150)

> ## Inject ADXL345 bus faults in CI
>
> Wire ADXL345 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)
