Compliance & Verification

ISO 26262 firmware fault-injection & traceability support

Run deterministic fault-injection matrices and branch/line coverage exports on compiled automotive MCU binaries in CI.

ISO 26262 Part 6 calls for structural coverage measurement, fault-injection testing of safety mechanisms and bi-directional traceability between test cases and results. Running those fault sweeps on a physical HIL rack bottlenecks pull requests to nightly runs.

CircuitTwin runs deterministic fault matrices (CAN bus-off, sensor frozen output, brownout reset, peripheral NACK) on the target ELF and exports JUnit, SARIF and lcov/Cobertura coverage. CircuitTwin is not a tool-qualified ISO 26262 TCL3 tool; teams use it alongside physical HIL verification and their own tool qualification process.

ISO 26262 Part 6 workflow mapping

Verification activityCircuitTwin supportBoundary to document
Fault-injection testingCAN errors, sensor stuck/offset, bus disconnectsFunctional register level; supplement with physical HIL for electrical faults
Structural coveragelcov and Cobertura exports from target ELFVerify against target compiler flags & optimisation level
Determinism re-checkct test run --recheck compares final-state digestsProves repeatable pass/fail across identical inputs
Unmodelled-register guardExit code 4 names peripheral + PCPrevents false-positive verification passes

Local CLI workflow

Shell — run fault matrix with coverage
ct test matrix run --json --recheck \
  --junit evidence/iso26262-junit.xml \
  --lcov evidence/coverage.info \
  tests/safety-mechanisms.yaml

Suite & fault configuration

tests/safety-mechanisms.yaml
version: 1
board: nucleo-h743zi2
firmware: build/ecu_app.elf
tests:
  - name: safe-state-on-imu-freeze
    faults:
      - at_ms: 200
        part: bmi088
        kind: frozen_reading
    expect:
      console_contains: "SAFE_STATE_ENTERED"
      exit_code: 0

CI pipeline integration

.gitlab-ci.yml — safety regression job
safety-fault-matrix:
  script:
    - ct test matrix run --json --recheck --junit junit.xml --lcov cov.info tests/safety-mechanisms.yaml
  artifacts:
    paths: [cov.info]
    reports:
      junit: junit.xml

ISO 26262 Part 6 requirements-to-test traceability

Execute compiled automotive ECU binaries in headless CI and trace every fault-injection test case back to safety requirements.

ISO 26262 Part 6 emphasizes back-to-back testing, boundary-value analysis and fault injection on the target binary. Physical HIL racks bottleneck teams to overnight queues.

CircuitTwin runs compiled S32K144, S32K344, STM32H7 and AURIX binaries on every pull request, testing CAN-FD error frames, PMIC window watchdogs (TLF35584) and safe-state transitions with deterministic logs.

ISO 26262 Part 6 test methods

Method (Table 10/11)CircuitTwin implementationTarget artifact
Fault injectionCAN drop_ack, PMIC SPI fault, sensor freezePass/fail JUnit + fault timeline
Error guessing / boundarySuite matrix sweeping min/max ADC and CAN IDsMatrix summary JSON
Back-to-back verificationCompare host model vectors against target ELF outputDeterministic console / trace diff
Shell - run automotive ECU fault matrix
ct test matrix run --json --junit results/iso26262.xml tests/ecu-safety-matrix.yaml
tests/ecu-safety-matrix.yaml
version: 1
board: s32k144-evb
firmware: build/ecu_app.elf
matrix:
  - name: SWR-101-can-busoff-safe-state
    faults:
      - at_ms: 100
        bus: CAN0
        kind: drop_ack
        count: 32
    expect:
      console_contains: "SAFE_STATE_ENTERED"
  - name: SWR-102-pmic-watchdog-reset
    faults:
      - at_ms: 150
        part: tlf35584
        kind: bus_disconnect
        duration_ms: 80
    expect:
      console_contains: "PMIC_FAULT_LATCHED"

Troubleshooting checklist

SymptomFix
Need tool qualification boundary statementRecord twin evidence standing (verified/provisional) and reserve final electrical/timing sign-off for physical HIL.
Safety mechanism never triggers under nominal testsAdd explicit fault-injection rows (frozen sensor, CAN ACK error, brownout) to exercise every safe-state branch.
Coverage differs between host unit tests and target ELFCollect lcov/Cobertura directly from target ELF execution on the twin.
Audit asks for repeatability proofPass --recheck and archive the matching state digests from the JSON report.
Tool qualification questions from assessorCircuitTwin is not a qualified safety tool; use it for rapid pre-HIL regression and pair with qualified HIL sign-off per TCL.
FlexCAN timing disagrees between two ECUsVerify nominal and FD data bitrates in the CAN Bit Timing Calculator.

Frequently asked questions

QuestionAnswer
Is CircuitTwin ISO 26262 tool-qualified?No. CircuitTwin is an engineering verification and pre-HIL fault-injection simulator that accelerates regression testing and produces reproducible artifacts alongside your qualified safety workflow.

Related boards & component twins

More in Compliance & Verification