Environment & Temperature

# Analog Devices / Maxim MAX31855 digital twin

Cold-junction compensated K-type thermocouple-to-digital converter.

standing: provisional SPI (read-only) (SPI1 on nucleo-f767zi) SPI Mode 0 (max 5 MHz SCLK)

Vendor Analog Devices / Maxim Environment & Temperature

Interface SPI SPI Mode 0 (max 5 MHz SCLK)

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

## Driver oracle & capability record

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

| Driver reference         | [libdriver/max31855 driver (commit 5f145c394)](https://github.com/libdriver/max31855) (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 | thermocouple +/-2 C (K type), 0.25 C resolution; cold junction 0.0625 C resolution (MAX31855 data sheet)                                        |
| 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 |
| ---------------- | --------- | --------- | ----- | ------------------- |
| THERMOCOUPLE\_mC | 100250 mC | 100250 mC | 0 mC  | ±2000 mC            |
| JUNCTION\_mC     | 25062 mC  | 25062 mC  | 0 mC  | ±63 mC              |

## Key registers & reset values

| Address / Field  | Register               | Reset / Expected | Purpose                                          |
| ---------------- | ---------------------- | ---------------- | ------------------------------------------------ |
| Bits \[31:18\]   | TC\_TEMP               | 0.25 °C/LSB      | 14-bit signed thermocouple temperature           |
| Bits \[15:4\]    | CJ\_TEMP               | 0.0625 °C/LSB    | 12-bit signed internal cold-junction temperature |
| Bits \[16, 2:0\] | FAULT / SCV / SCG / OC | 0 = OK           | Open-circuit and short-to-VCC/GND fault bits     |

## Attach with ct CLI

Shell - run firmware with MAX31855

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

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

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

tests/max31855-fault.suite.yaml

```
version: 1
board: nucleo-f767zi
firmware: build/app.elf
tests:
  - name: max31855-spi-fault-and-stuck-sample
    faults:
      - at_ms: 40
        part: max31855
        kind: bus_disconnect
        duration_ms: 25
      - at_ms: 120
        part: max31855
        kind: frozen_reading
    expect:
      console_contains: "SENSOR_FAULT_HANDLED"
      exit_code: 0
```

## Compatible board twins

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

## More in Environment & Temperature

[AHT20 (Aosong)](https://circuittwin.ai/twins/aht20) [BME280 (Bosch)](https://circuittwin.ai/twins/bme280) [BME680 (Bosch)](https://circuittwin.ai/twins/bme680) [BME688 (Bosch)](https://circuittwin.ai/twins/bme688) [DS18B20 (Analog)](https://circuittwin.ai/twins/ds18b20) [HDC1080 (Texas)](https://circuittwin.ai/twins/hdc1080)

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