Automotive & Robotics Buses

CAN bus firmware simulator.

Wire multi-ECU STM32, NXP FlexCAN, and Teensy boards over CAN and CAN FD without physical transceivers. Inspect DBC-decoded frames, inject ACK and bus-off faults, and run deterministic regression tests in CI.

SocketCAN vs physical benches vs CircuitTwin.

Test real peripheral registers, filter banks, and error-passive transitions before hardware arrives.

OptionFirmware executedBit timing & registersFault testing
Linux SocketCAN (vcan)Host Linux processes onlyNo MCU bit timing or bxCAN/FlexCAN registersNo physical ACK or bus-off controller state machine
Physical CAN bench + USB adaptersReal flashed boardsReal hardware timing, manual cablingRequires relay rigs; hard to automate in parallel CI
CircuitTwin CAN SimulatorReal STM32, NXP, Teensy, and multi-ECU ELF/HEX binariesRegister-level bxCAN, FDCAN, and FlexCAN bit timingScripted bus shorts, missing ACK, bus-off recovery, DBC decode

Multi-ECU CAN FD scene in YAML.

Define ECUs, bitrate, DBC file, and timed fault injection in one version-controlled file.

Run the scene locally or in CI with ct scene run to verify arbitration, acceptance filter masks, and bus-off recovery across every commit.

scenes/dual-ecu-canfd.yaml
scene: dual-ecu-canfd
nodes:
  - id: motor-ecu
    board: nucleo-f767zi
    firmware: build/motor-controller.elf
  - id: bms-ecu
    board: stm32g474-nucleo
    firmware: build/bms.elf
buses:
  - name: can0
    protocol: can_fd
    bitrate: 500000
    data_bitrate: 2000000
    dbc: specs/powertrain.dbc
    members: [motor-ecu.CAN1, bms-ecu.FDCAN1]
faults:
  - at_ms: 600
    target: can0
    kind: ack_drop
    duration_ms: 80
ct scene run --json scenes/dual-ecu-canfd.yaml --record can-trace/

Common questions.

Can I simulate multiple STM32 or NXP ECUs talking over CAN and CAN FD?

Yes. Wire two or more microcontroller twins together on a shared CAN or CAN FD bus in the browser editor or a YAML scene file. CircuitTwin runs all nodes in lock-step virtual time across STM32 bxCAN/FDCAN, NXP S32K/i.MX RT FlexCAN, and Teensy controllers.

Does CircuitTwin support DBC signal decoding and bus-off fault injection?

Yes. Attach your DBC file to decode live CAN frames in the bus monitor or JSON traces, and inject missing ACK errors, bit flips, bus shorts, or node disconnects to verify TEC/REC error counters and bus-off recovery logic.

Do I need physical CAN transceivers or USB-CAN dongles?

No. You can wire MCU CAN pins directly or include transceiver twins such as SN65HVD230 or TJA1051 in your scene, then run everything locally on Windows, macOS, Linux, or inside GitHub Actions.

Can I test CANopen, J1939, or UDS diagnostic stacks?

Yes. Because CircuitTwin runs your compiled firmware binary and transfers real CAN frames across virtual transceivers, CANopenNode, J1939, ISO-TP, and UDS stacks work without modifying protocol code.

Related guides.