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 link | Example mixed-MCU pair | Faults injectable |
|---|---|---|
CAN / CAN-FD bus | STM32H743 + NXP S32K144/S32K344 | Node mute, ACK drop, frame corruption |
UART cross-link | STM32F767 + nRF52840 or ATmega328P | Baud mismatch, byte drop, link disconnect |
I2C / SPI link | Master MCU + slave MCU or shared flash | NACK 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.jsonSuite & 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.jsonTroubleshooting checklist
| Symptom | Fix |
|---|---|
| One node prints before the other finishes boot init | Add explicit handshake retries in firmware; scenes run both MCUs from t=0 with their real boot clock speeds. |
Frequently asked questions
| Question | Answer |
|---|---|
| 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. |