DCM module in AUTOSAR Explained

The DCM plays a crucial role in supporting OBD, UDS and other diagnostic protocols used in vehicle ECUs. DCM is a service layer module in the AUTOSAR architecture. It acts as the interface between diagnostic services (like UDS) and the underlying communication stack (e.g., CAN, LIN, FlexRay, Ethernet).

Advertise here!

What is the DCM Module in AUTOSAR?

During vehicle diagnostics, the diagnostic tester transmits a request to the ECU, which in turn provides a response. The AUTOSAR DCM is responsible for managing this interaction. It acts as a bridge between the diagnostic tester and the ECU. Upon receiving a request, the DCM (Diagnostic Communication Manager) first verifies its validity. If the request meets the necessary criteria and is successfully executed, the DCM returns a positive response along with the relevant data. However, if the request is found to be invalid, the DCM issues a negative response accompanied by a specific Negative Response Code (NRC) indicating the reason for rejection.

Position of the DCM module in AUTOSAR Architecture
Position of the DCM module in AUTOSAR Architecture. Image courtsey: AUTOSAR

DCM allows external diagnostic tools, like service testers to communicate with the vehicle’s ECUs to perform tasks such as:

  • Reading sensor and actuator values
  • Performing memory dumps
  • Activating special test modes
  • Reprogramming the ECU firmware

The DCM ensures protocol-compliant communication and helps manage the diagnostic session, security access, and timing requirements.

Key Functions and Responsibilities of DCM

1. Protocol Handling (UDS/OBD)

DCM handles the application layer of UDS on CAN (ISO 14229-1) and OBD-II (ISO 15765-4). It interprets and processes diagnostic requests received from external diagnostic tools.

2. Session Management

DCM maintains and switches between various diagnostic sessions such as:

  • Default Session
  • Extended Diagnostic Session
  • Programming Session

Each session defines the access level and the range of allowed services.

3. Security Access

The DCM module manages security by implementing a challenge-response mechanism for access to sensitive operations like ECU reprogramming or variant coding.

4. Diagnostic Service Processing

DCM processes a wide range of UDS services like:

  • 0x10: Diagnostic Session Control
  • 0x11: ECU Reset
  • 0x22: Read Data by Identifier
  • 0x2E: Write Data by Identifier
  • 0x27: Security Access
  • 0x31: Routine Control
  • 0x34: Request Download (used for flashing)
  • 0x36: Transfer Data

5. Communication Control

It manages the enabling/disabling of communication messages, such as turning off periodic data transmission during a diagnostic session.

6. Timing Management

DCM ensures compliance with strict P2/P2 timing requirements* for responses to diagnostic requests. It maintains timers to detect client timeouts and prevent deadlocks.

7. Integration with Other AUTOSAR Modules

  • ComM (Communication Manager): ComM in AUTOSAR is responsible for managing the communication states (like full communication, silent communication, or no communication) of network channels in coordination with other modules. It ensures efficient network usage by controlling when ECUs should be active or go to sleep based on communication needs.
  • PduR (PDU Router): PduR in AUTOSAR acts as a routing layer that forwards Protocol Data Units (PDUs) between different communication modules, such as CAN, LIN, and the application layer. It enables flexible and efficient data exchange by decoupling the transport and network layers from the upper software modules.
  • CanTp (Transport Protocol for CAN): CanTp in AUTOSAR is responsible for handling the segmentation and reassembly of large diagnostic messages that exceed the CAN frame size (8 bytes). It ensures reliable data transmission over the CAN network by managing flow control, sequence numbers, and timing between sender and receiver.
  • DEM (Diagnostic Event Manager): DEM is responsible for detecting, storing, and managing diagnostic events and fault information (DTCs) within an ECU. It provides standardized interfaces for reporting errors, retrieving event status, and supporting diagnostic services through integration with modules like DCM.
  • NvM (Non-volatile Memory Manager): NvM in AUTOSAR handles the reading, writing, and management of data stored in non-volatile memory, such as EEPROM or flash. It ensures that critical data like configurations, diagnostic information, and calibration values are retained across ECU power cycles and available when needed.

DCM interacts closely with these modules for robust diagnostic operation and persistent data handling.

Interaction of the DCM with other modules
Interaction of the DCM with other modules

Architecture and Configuration of DCM in AUTOSAR

Layered Architecture

The DCM module resides in the Service Layer of AUTOSAR and interacts with:

  • Application Layer (through RTE)
  • Communication Stack (via PduR and transport layers)
plaintextCopyEdit[ Tester Tool ]
     ⇅ UDS/OBD
[ CAN Interface ]
     ⇅
[ PduR ] ⇆ [ CanTp ]
     ⇅
[ DCM ]
     ⇅
[ RTE ] ⇆ [ Application SWCs ]

Configuration Parameters

DCM is highly configurable using AUTOSAR XML (ARXML) files and configuration tools like DaVinci Developer, EB tresos, or Vector’s AUTOSAR Builder. Key configuration elements include:

  • Diagnostic Services List
  • Session Control Parameters
  • Security Access Sequences
  • Routines and Data Identifiers (DIDs)
  • Timing Parameters (P2/P2)*
  • Memory Addressing

Final Thoughts

The DCM is a critical module in the AUTOSAR Service Layer that facilitates robust, standardized diagnostics for ECUs. Its ability to handle complex diagnostic communication protocols like UDS and OBD-II makes it indispensable for vehicle software maintenance, testing and compliance. When implemented and configured properly, the DCM provides a secure, scalable, and reliable interface for all automotive diagnostic needs.