Fault Injection & Debugging

Multi-board ECU scene orchestration over CAN, SPI and UART

Test host-coprocessor UART links, dual-ECU CAN-FD networks and AVR-to-STM32 SPI bridges in a single lockstep run.

Real embedded products rarely run on one MCU. A Linux or STM32H7 main controller talks to an STM32G0 power supervisor over I2C, an nRF52 over UART, or another ECU over CAN-FD.

CircuitTwin scenes run multiple compiled ELFs across heterogeneous ISAs (ARM + RISC-V + AVR + Xtensa) on one shared virtual timeline so cross-board protocol bugs surface before hardware integration.

Multi-board link types supported in scenes

Shared linkExample mixed-MCU pairFaults injectable
CAN / CAN-FD busSTM32H743 + NXP S32K144/S32K344Node mute, ACK drop, frame corruption
UART cross-linkSTM32F767 + nRF52840 or ATmega328PBaud mismatch, byte drop, link disconnect
I2C / SPI linkMaster MCU + slave MCU or shared flashNACK burst, wrong chip-select wiring

Local CLI workflow

Shell - run multi-board scene
ct scene run --json --junit results/scene.xml scenes/dual-ecu-canfd.scene.json

Suite & fault configuration

scenes/dual-ecu-canfd.scene.json
{
  "schemaVersion": "ct.scene/1",
  "nodes": [
    { "id": "gw", "board": "nucleo-h743zi2", "firmware": "build/gw.elf" },
    { "id": "ecu", "board": "s32k144-evb", "firmware": "build/ecu.elf" }
  ],
  "links": [
    { "kind": "can", "name": "can0", "endpoints": ["gw:FDCAN1", "ecu:CAN0"] }
  ]
}

CI pipeline integration

.github/workflows/multi-board-scene.yml
name: Multi-Board Scene CI
on: [push, pull_request]
jobs:
  scene:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: ct scene run --json --junit results/scene.xml scenes/dual-ecu-canfd.scene.json

Troubleshooting checklist

SymptomFix
One node prints before the other finishes boot initAdd explicit handshake retries in firmware; scenes run both MCUs from t=0 with their real boot clock speeds.

Frequently asked questions

QuestionAnswer
Can one scene combine an 8-bit AVR and a 32-bit ARM Cortex-M7?Yes. CircuitTwin scenes step every node on a unified virtual clock, as verified by our avr-f767-uart and esp32s3-f767-can test scenes.

Related boards & component twins

More in Fault Injection & Debugging