AUTOSAR DEM / DCM / FiM: ECU diagnostic module architecture
AUTOSAR Classic’s DEM (Diagnostic Event Manager), DCM (Diagnostic Communication Manager) and FiM (Function Inhibition Manager) together form the ECU diagnostic subsystem.This article organizes the responsibilities, interaction methods and KopherSAR of the three and its complete implementation.
Summary
AUTOSAR The diagnostic subsystem of Classic ECU consists of three core modules:
- DEM (Diagnostic Event Manager): Management events, DTC state machine, Snapshot, Aging.
- DCM (Diagnostic Communication Manager): Handles UDS (ISO 14229) service requests and routes to DEM/SWC.
- FiM (Function Inhibition Manager): Inhibit functions according to fault status (preventing functions that continue to run when there is a fault from causing greater damage).
KopherSAR fully implements the three, and uniformly configures DTC list, Snapshot, Inhibition conditions, UDS Session and SecurityAccess through KopherConfig.
Technical Role
DEM (Diagnostic Event Manager)
- Receive event status submitted by application layer SWC or BSW through
Dem_SetEventStatus. - Update the DTC state machine (test failed, confirmed, pending, healed, aged…) according to event-to-DTC mapping.
- Maintain Snapshot Record (Freeze Frame) and Extended Data Record.
- Persist DTC to NV Memory (NvM).
DCM (Diagnostic Communication Manager)
- Receive ISO 14229 UDS messages (via PduR / CanTp / DoIP).
- Parse service ID, Sub-Function, parameters, route to DEM, NvM, ECU State Manager or application SWC.
- Manage Diagnostic Session (Default / Programming / Extended), SecurityAccess, TesterPresent.
- Respond to Positive/Negative Response Codes (NRC).
FiM (Function Inhibition Manager)
- Suppress specific SWC functions based on the DTC status provided by the DEM (such as confirmed).
- The application layer SWC first queries FiM (
FiM_GetFunctionPermission) before executing, and decides whether to execute based on the result. - Ensure that malfunctions do not accidentally trigger functions that may cause greater damage (such as turning off fast charging when the battery overheats).
Architecture
┌────────────────────────────┐
│ Tester / KopherUDS │
└──────────────┬──────────────┘
│ UDS over CAN / DoIP
▼
┌────────────────────────────┐
│PduR / CanTp / DoIP │
└──────────────┬──────────────┘
▼
┌────────────────────────────┐
│ DCM │
│ (Service Routing, │
│Session Management) │
└──┬──────────┬──────────────┘
│ │
0x19/0x14│ │0x27/0x10/0x11/0x31...
▼ ▼
┌──────────┐ ┌───────────┐
│ DEM │ │ Routine │
│ (DTC FSM)│ │ Handler │
└──┬───────┘ └──────────┘
│
│ Inhibition
▼
┌──────────┐ ┌───────────┐
│ FiM │◀───│ SWC │
└──────────┘ └───────────┘
Key Capabilities
DEM
- Event to DTC correspondence, DTC state machine (UDS DTC Status Byte 8 bit).
- Snapshot / Extended Data configuration.
- Aging Cycle / Healing Cycle / Operation Cycle management. -DTC Severity/Priority.
- OBD compatible DTC encoding.
- Persist DTC to NV Memory.
DCM
- Full ISO 14229 service set (0x10, 0x11, 0x14, 0x19, 0x22, 0x23, 0x27, 0x28, 0x2E, 0x2F, 0x31, 0x34/0x36/0x37, 0x3D, 0x3E, 0x85, 0x87).
- Session/Security management.
- TesterPresent heartbeat.
- Routing to SWC Routine, DEM, NvM.
fM
- Suppression function based on DTC status (blacklist mechanism).
- Integrated BswM mode switching.
- Supports multiple DTC condition combinations.
Engineering Inputs Required
| Input | Purpose |
|---|---|
| DTC List + Description | DEM Configuration Basics. |
| Snapshot / Extended Data item | Which signals are frozen and which statistics are accumulated when triggered. |
| Aging/Healing Rules | When DTCs are automatically lifted. |
| UDS Service scope | Which services need to be enabled under which Session and whether SecurityAccess is required. |
| Routine list | 0x31 The application layer Routine function corresponding to RoutineControl. |
| FiM Suppression Rules | Which SWC functions are suppressed in which DTC states. |
| Persistence strategy | DTC/Snapshot writing timing and section configuration to NvM. |
How KopherBit Supports This
- Full BSW: KopherSAR Full implementation of DEM/DCM/FiM, compliant with AUTOSAR Classic specification.
- Configuration Tool: KopherConfig graphical configuration of DTC, Snapshot, UDS service, SecurityAccess, FiM rules.
- Host computer: KopherUDS directly connects to DCM to facilitate verification of all service behaviors.
- Integration: Share SecurityAccess algorithm and Session logic with KopherBoot UDS Bootloader.
FAQ
What are the 8 bits of DEM’s DTC state machine?
DTC Status Byte (ISO 14229): testFailed, testFailedThisOperationCycle, pendingDTC, confirmedDTC, testNotCompletedSinceLastClear, testFailedSinceLastClear, testNotCompletedThisOperationCycle, warningIndicatorRequested.
How to call Routine between DCM and SWC?
After DCM receives the 0x31 RoutineControl, it routes to the Routine function provided by the application layer SWC according to the ARXML configuration (through RTE).After SWC completes the Routine, it returns the results to DCM, which assembles the UDS response.
What is the difference between FiM and BswM?
FiM focuses on suppression functions based on fault conditions; BswM handles communication, ECU mode switching and other larger-scale mode management.The two complement each other: BswM switches communication modes, and FiM suppresses specific functions.
Do all SWCs need to query FiM?
no.Only functions that “should not be executed in case of failure” (such as safety-related functions) need to query the FiM.Configuration is determined based on security analysis.
Does DEM support DEM 2.0?
KopherSAR DEM corresponds to the AUTOSAR Classic Platform specification.If customers have specific requirements for DEM 2.0 (including multi-event memory, DTC priority and other advanced functions), they can be adjusted according to the project configuration scope.
What is the difference between Snapshot and OBD Freeze Frame?
UDS Snapshot content is defined by the OEM; OBD Freeze Frame is a signal set standardized by regulations.OBD-related ECUs need to implement OBD-II services (0x01–0x0A), and KopherSAR DCM provides OBD sub-modules.
JSON-LD
{
"@context": "https://schema.org",
"@type": "TechArticle",
"headline": "AUTOSAR DEM / DCM / FiM: ECU diagnostic module architecture",
"description": "AUTOSAR Classic's three major diagnostic module responsibilities, DCM, and FiM responsibilities, interaction methods, and KopherSAR are fully implemented.",
"url": "https://kopherbit.com/knowledge/autosar-dem-dcm-fim-diagnostics/",
"datePublished": "2026-05-09",
"dateModified": "2026-05-09",
"inLanguage": "zh-TW",
"keywords": ["DEM", "DCM", "FiM", "AUTOSAR", "Diagnostics", "UDS", "DTC"],
"articleSection": "Diagnostics",
"author": { "@type": "Organization", "name": "KopherBit", "url": "https://kopherbit.com" },
"publisher": { "@type": "Organization", "name": "KopherBit", "logo": { "@type": "ImageObject", "url": "https://kopherbit.com/logo.png" } }
}