Home Learning Paths ECU Lab Assessments Interview Preparation Arena Pricing Log In Sign Up

Diagnostic Coverage: Formal Definition

Definition

Diagnostic Coverage (DC) of a safety mechanism is the fraction of the failure rate of an element that is detected (or controlled) by that mechanism:

DC = (rate of detected failures) / (total failure rate of element)

Or equivalently: DC = 1 − (residual failure rate / total failure rate)

DC is expressed as a percentage and must be justified by evidence for each safety mechanism.

ISO 26262 Part 5 Annex D: Reference DC Values

Safety MechanismFault Type DetectedDC RangeNotes
Plausibility check (range)Stuck-at-high/low, open60–90%Limited: doesn't catch drift within range
Cross-channel comparisonDrift, stuck-at, offset90–99%Requires diverse channels; CCF risk
CRC-16/CRC-32 on dataData corruption, bit flip≥ 99%Multi-bit errors; coverage depends on polynomial
ECC (SEC) on RAM/flashSingle bit flip100% detect + correctSEC: corrects 1 bit; DED: detects 2 bits
ADC reference channelADC gain/offset error90–97%Internal reference vs external reference comparison
Window watchdogTask hang, timing violation≥ 99%If correctly sized and not trivially kickable
Lockstep CPUCPU instruction execution error≥ 99%Random hardware faults only; not SW bugs
ROM CRC test (startup)ROM bit corruption≥ 99%Must be done at every startup or periodically
RAM March test (periodic)Latent RAM cell fault60–90%Coverage depends on test algorithm depth

DC Validation: Test Injection

Cfault_injection.c
/* Fault injection testing: validate that safety mechanism achieves claimed DC */
/* Required for ASIL-D to justify DC > 90% (ISO 26262 Part 5 Annex D) */

/* Method 1: Compile-time fault injection (mutation testing) */
/* Tool: Squore, Parasoft, LDRA with mutation support */
/* Inject fault: flip a bit in sensor reading; confirm diagnostic detects it */

/* Method 2: Runtime fault injection via debugger/test interface */
/* Available: JTAG hardware breakpoint → modify variable → confirm detection */

/* Example: injecting torque sensor stuck-at fault */
#include "TorqueSensor.h"
#include "SafetyMonitor.h"

#ifdef FAULT_INJECTION_ENABLED  /* compile flag; only in test builds */

static boolean g_fi_ch_a_stuck = FALSE;
static float   g_fi_ch_a_value = 0.0f;

float TorqueSensor_ReadChannelA(void)
{
    float real_value = ADC_Read(ADC_TORQUE_CH_A);

    if (g_fi_ch_a_stuck) {
        return g_fi_ch_a_value;  /* override with injected fault */
    }
    return real_value;
}

/* Test: inject stuck-at-0V fault; confirm range check triggers within 20ms */
void FaultInjection_Test_RangeCheck(void)
{
    g_fi_ch_a_stuck = TRUE;
    g_fi_ch_a_value = 0.0f;   /* 0V = below valid range (0.3V–4.7V) */

    uint32_t t_start = Timer_GetMs();
    while (!SafetyMonitor_IsFaultActive(FAULT_TORQUE_CH_A_RANGE)) {
        if (Timer_GetMs() - t_start > 20u) {
            TEST_FAIL("Range check did not trigger within FTTI (20ms)");
            break;
        }
    }
    uint32_t detection_ms = Timer_GetMs() - t_start;
    TEST_LOG("Range check detection time: %u ms", detection_ms);
    TEST_ASSERT(detection_ms <= 10u);  /* FHTI = FTTI/2 = 10ms */

    g_fi_ch_a_stuck = FALSE;
    SafetyMonitor_ClearFault(FAULT_TORQUE_CH_A_RANGE);
}

#endif /* FAULT_INJECTION_ENABLED */

Methods for DC Estimation

MethodEvidence TypeAccepted ForLimitations
ISO 26262 Annex D lookupStandard reference tableAll ASIL levels; fastConservative estimates; may underestimate actual DC
Analytical calculationMathematical model of failure modes vs mechanismASIL-C/D where higher DC is claimedRequires detailed fault model; must be reviewed
Fault injection testingTest evidence from hardware fault injectionBest evidence; supports > 99% claimsExpensive; requires test infrastructure
FMEA cross-referenceFMEA-derived DC from failure mode analysisASIL-B/C; supports Annex D valuesLess rigorous than injection; acceptable with review

Summary

DC estimation is one of the most scrutinised aspects of a functional safety assessment because it directly determines whether the SPFM and LFM targets are met. Using ISO 26262 Annex D lookup values is conservative and well-accepted; claiming DC values above Annex D requires additional evidence (fault injection tests or detailed analytical justification). A common assessor finding: a project claims DC = 99% for a plausibility check, but ISO 26262 Annex D caps plausibility checks at 90% — the higher claim requires fault injection test evidence. The fault injection tests themselves must be systematic (covering all failure modes in the FMEA) and documented in a test report that links each test case to the specific DC claim it validates.

🔬 Deep Dive — Core Concepts Expanded

This section builds on the foundational concepts covered above with additional technical depth, edge cases, and configuration nuances that separate competent engineers from experts. When working on production ECU projects, the details covered here are the ones most commonly responsible for integration delays and late-phase defects.

Key principles to reinforce:

  • Configuration over coding: In AUTOSAR and automotive middleware environments, correctness is largely determined by ARXML configuration, not application code. A correctly implemented algorithm can produce wrong results due to a single misconfigured parameter.
  • Traceability as a first-class concern: Every configuration decision should be traceable to a requirement, safety goal, or architecture decision. Undocumented configuration choices are a common source of regression defects when ECUs are updated.
  • Cross-module dependencies: In tightly integrated automotive software stacks, changing one module's configuration often requires corresponding updates in dependent modules. Always perform a dependency impact analysis before submitting configuration changes.

🏭 How This Topic Appears in Production Projects

  • Project integration phase: The concepts covered in this lesson are most commonly encountered during ECU integration testing — when multiple software components from different teams are combined for the first time. Issues that were invisible in unit tests frequently surface at this stage.
  • Supplier/OEM interface: This is a topic that frequently appears in technical discussions between Tier-1 ECU suppliers and OEM system integrators. Engineers who can speak fluently about these details earn credibility and are often brought into critical design review meetings.
  • Automotive tool ecosystem: Vector CANoe/CANalyzer, dSPACE tools, and ETAS INCA are the standard tools used to validate and measure the correct behaviour of the systems described in this lesson. Familiarity with these tools alongside the conceptual knowledge dramatically accelerates debugging in real projects.

⚠️ Common Mistakes and How to Avoid Them

  1. Assuming default configuration is correct: Automotive software tools ship with default configurations that are designed to compile and link, not to meet project-specific requirements. Every configuration parameter needs to be consciously set. 'It compiled' is not the same as 'it is correctly configured'.
  2. Skipping documentation of configuration rationale: In a 3-year ECU project with team turnover, undocumented configuration choices become tribal knowledge that disappears when engineers leave. Document why a parameter is set to a specific value, not just what it is set to.
  3. Testing only the happy path: Automotive ECUs must behave correctly under fault conditions, voltage variations, and communication errors. Always test the error handling paths as rigorously as the nominal operation. Many production escapes originate in untested error branches.
  4. Version mismatches between teams: In a multi-team project, the BSW team, SWC team, and system integration team may use different versions of the same ARXML file. Version management of all ARXML files in a shared repository is mandatory, not optional.

📊 Industry Note

Engineers who master both the theoretical concepts and the practical toolchain skills covered in this course are among the most sought-after professionals in the automotive software industry. The combination of AUTOSAR standards knowledge, safety engineering understanding, and hands-on configuration experience commands premium salaries at OEMs and Tier-1 suppliers globally.

← PreviousSafety Mechanisms for HardwareNext →Hardware Architectural Metrics Calculation