Autosar DCM
Autosar DCM
Autosar DCM
Manager
Presented by:
SHANKU KAK
Crevavi Technologies Pvt. Ltd.
Diagnostic Communication Manager
The Dcm module provides a common API for diagnostic services. The functionality of the. Dcm
module is used by external diagnostic tools during the development, manufacturing or service.
The Dcm module ensures diagnostic data flow and manages the diagnostic states, especially
diagnostic sessions and security states. Furthermore, the Dcm module checks if the diagnostic
service request is supported and if the service may be executed in the current session according
to the diagnostic states.
• In the AUTOSAR Architecture the Diagnostic Communication Manager is located in the
Communication Services (Service Layer).
• The Dcm module is network-independent. All network-specific functionality (the specifics of
networks like CAN, LIN, FlexRay or MOST) is handled outside of the Dcm module.
• The PDU Router (PduR) module provides a network-independent interface to the Dcm
module. The Dcm module receives a diagnostic message from the PduR module.
• The Dcm module processes and checks internally the diagnostic message. As part of
processing the requested diagnostic service, the Dcm will interact with other BSW modules
or with SW-Components (through the RTE) to obtain requested data or to execute requested
commands. This processing is very service-specific. Typically, the Dcm will assemble the
gathered information and send a message back through the PduR module.
The Diagnostic Communication Manager (DCM) is an intermediate layer between the
application and the vehicle network communication (CAN, LIN, FlexRay and MOST) which is
capsulated by the PDU Router. The DCM has an interface with the PDU Router. The DCM itself is
network independent. So the protocol and message configuration will be done in layers below
the DCM. DCM module consists of the following 3-submodules:
• The DSD module adds the service identifier (SID) (0x7F if it is negative feedback) and the data
flow of the response to "Dcm_MsgContextType". Then DSD transfers it to the buffer and adds
the SID to the first byte of the buffer.
• For configuration, DSD is mainly to configure the services that need to be implemented, and the
• Support checking the diagnostic service identifier and adapting the diagnostic
message: DSD validates the received diagnostic request message from DSL and if supported
it is forwarded to appropriate DSP or else it is rejected by sending negative response. Every
diagnostic request has a Service Identifier(SID) to indicate the type of request. DSD has
the Service Identifier Table which has predefined supported SIDs, this table is generated
after configuration and is provided by DSL. DSD checks this received SID from request in the
Service Identifier Table and if received SID is present in the table, it is forwarded to
appropriate DSP or else it is rejected by a negative response with NRC 0x11 i.e. Service not
supported to the DSL.
• Handling of suppression of positive response message: UDS has a facility to suppress
the positive response message reception on each successful procession of diagnostic
request. This is handled by DSD. DSD checks if bit named “suppressPosRspMsgIndicationBit”
in received diagnostic request is TRUE, if it is then DSD won’t send positive responses. This
setting will be ignored if the busy responses is going on.
• Verification functionality: DSD sub-module is also responsible for verifying the received
diagnostic request. DSD sub-module will only accept the diagnostic request if it passes three
verifications:
– Verification of Diagnostic Session: As discussed above, a diagnostic session is a activity
window to perform diagnostics. Every session has a specific set of supported diagnostic
services. On reception of a new diagnostic request, DSD will get the current diagnostic
session information and will verify if the current received service request is allowed for
current session.
UDS service for DiagnosticSessionControl (0x10) is bypassed of this verification, or
else the tester won’t be able to change the diagnostic session then If the
received service request is not allowed in current diagnostic session, then DSD sends a
negative response with NRC (0x7F) which means Service is not supported for active
session.
– Verification of service security access levels: Some diagnostic services have restricted
security access levels. DSD sub-module takes care of verification of such services. When
a new diagnostic request is received from DSL, DSD gets the current active security level
from DSL and checks if the new diagnostic request is allowed for current security access
level. If the received diagnostic request is not allowed in the current security level, then
DSD sub-module sends a negative response with NRC (0x33). Again UDS service
SecurityAccess (0x27) is bypassed this verification, or else the tester will never be able to
access security restricted data. If the received service request is not allowed for current
security level, then DSD sends negative response with NRC 0x33 which means Security
access denied.
– Verification of the application environment or permission: Diagnostic cannot be
performed if ECU state is not proper or if environment is not appropriate. Like in after-
run ECU state, it is not allowed to process OBD requests.
• Distribution of diagnostic message to DSP: If the diagnostic service passes all the
checks (as described above), then DSD searches for a appropriate service executable
functionality of DSP and calls the corresponding DSP service interpreter.
DSD(Diagnostic Service Dispatcher)
The DSD module is responsible for checking the validity of diagnostic requests (diagnostic sessions,
security access levels, verification of application permissions), and tracking the progress of service
request execution.
1. Inspection and diagnosis services
When the DSL receives a new diagnostic request, the DSL notifies the DSD through the internal
interface. DSD calls Dcm_GetSesCtrlType () and Dcm_GetSecurityLevel () to obtain the current
Session and security level. The DSD module will check whether the diagnostic request SID is in the
"Service Identifier Table" of the current Session. If it is not in the table, DSD will send NRC 0x7F.
Service support, but the current Session does not support this sub-service, DSD will send NRC 0x7E;
then check whether the current security level meets the conditions, if the current security level
does not support the diagnostic request, DSD will send NRC 0x33. Finally, check the length of the
data.
• The DSD module adds the service identifier (SID) (0x7F if it is negative feedback) and the data
flow of the response to "Dcm_MsgContextType". Then DSD transfers it to the buffer and adds
the SID to the first byte of the buffer.
• For configuration, DSD is mainly to configure the services that need to be implemented, and the
• Assemble of positive or negative response: DSD sub-module assembles the
response for executed diagnostic request based on the response of DSP. If response is
positive, DSD sub-module adds the response service identifier (same as that of the
received diagnostic request SID) and response data (which is received from DSP) in the
response message while assembling. Or if the response is negative, then DSD assembles
a negative response message with NRC received from DSP.
• Initiate Transmission: DSD sub-module forwards the response message to DSL sub-
module for further transmission. When the DSL module receives the confirmation of
transmission from PduR, it transmits this information to DSD. Which the DSD sub-
module further forwards to DSP for its confirmation.
• DID implementation, including DcmDspData is used to configure the data type,
data length, and interface type of DID; DcmDspDidInfo is used to configure the
read and write function of DID; DcmDspDids is used to summarize DcmDspDidInfo
and DcmDspData, and add DID value.
• The realization of security level, including the number of bits of seed and key, the
maximum number of wrong accesses, and time parameters.
• Session configuration, including the level of the Session, whether the Session
supports jumping to Boot, and the time parameters P2 ServeMax and P2
*ServeMax.
Simulate
DSL DSD DSP User
Request DslInternal_ResponseOnOneDataByPeriodicId(uint8)
Data_Inidcation_functionality()
ReadDataByIdentifierServiceInterpreter()
<Module>_<DiagnosticService>(Std_ReturnType,
Dcm_ExtendedOpStatusType, Dcm_MsgContextType**,
alt protocol allowed? Dcm_NegativeResponseCodeType**)
[E_OK] Data_Indication_functionality()
Data_Indication_functionality()
E_PROTOCOL_NOT_ALLOWED]
Dcm_TpRxIndication()
Autosar Software
SW - C SW – C’s SW – C’s
Filter Providing Data Controlling
Services Monitor (For Event Memory Indicator(e.g. LED,
Entries)
Text msg., etc.)
AUTOSAR ( RTE )
BSW
Filter
Services
Monitor
Communication Services
Memory
Services
EcuM DCM
Dem
NvRAM
FiM J1939DCM Manager
Dlt
System Services
BASIC SOFTWARE
DEM(Diagnostic Event Manager)