Professional Documents
Culture Documents
Manager)
Interaction of Layers – Diagnostics (Transmit) (R4.0.3)
1.PduR_DcmTransmit() 11.PduR_CanTpTxConfirmation()
Diagnostic
Communication 4.Dcm_CopyTxData() PDU Router 2.CanTp_Transmit() CAN Transport
Manager (DCM) Layer
12.Dcm_TpTxConfirmation() 3.PduR_CanTpCoppyTxData()
5.CanIf_Transmit()
10.CanTp_TxConfirmation(
)
Diagnostic Event
BSW Module CAN
Manager (DEM)
Interface
Dem_ReportErrorStatus()
9.CanIf_TxConfirmation()
6.Can_Write()
FiM_DemTriggerOnEventStatus ()
CA
N µC
5.Dcm_StartOfReception( 4.PduR_CanTpStartOfReception ()
)
Diagnostic
Communication PDU Router CAN Transport
Manager (DCM) Layer
7.Dcm_CopyRxData()
6.PduR_CanTpCopyRxData ()
9.Dcm_TpRxIndication() 3.CanTp_RxIndication()
10.Dem_EnableDTCStorage( 8.PduR_CanTpRxIndication ()
)
(for UDS Service 0x85)
Diagnostic Event
Manager (DEM) CAN
Interface
2.CanIf_RxIndication()
CAN
Driver
1.Receive Interrupt
CA
N µC
Usage of Dcm
All services run on the protocol layer In the service layer, Dcm provides standard
diagnostic service implementations
Dcm is part of the Diagnosis Package within the Stack and configured by the
configuration tool that generates required configuration .c/.h files.
Dcm Features: Architecture Overview
Dcm internally consists of 3 functional blocks:
Analyze the received request message Check format and whether the addressed
sub-function is supported
Acquire data or execute the required function call on the Dem, SWC’s or other
BSW modulesAssemble the response
Diagnostic services
DiagnosticSessionControl (10 hex) service
If the key send by the client is not matching with the key stored in the server
it is considered as a false access attempt. If access is rejected for any other
reason, it shall not be considered a false access attempt
SecurityAccess (27 hex) service
This service requests the server to effectively perform a server reset based on the
content of the resetType parameter value embedded in the ECUReset request
message. The ECUReset positive response message (if required) shall be sent before
the reset is executed in the server(s).
After a successful server reset the server shall activate the defaultSession.
Autosar Dcm Training
22
Autosar Dcm Training
24
Autosar Dcm Training
Interfaces: Overview
25
Autosar Dcm Training
26
DEM(Diagnostic Event Manager)
DEM
DEM
the Dem provides fault information to the Dcm (e.g. read all stored DTCs
from the event memory).
The Dem offers interfaces to the application layer and to other BSW
modules.
Diagnostic Event :
Smallest unit handled by the DEM. Represents the Result of the
monitor. Each event is represented by an EventId and related EventName
and are unique per Dem module represented by the ECU configuration .
Event priority :
Ranking of events based on the level of importance.Highest
priority=1 and higher values lesser priority. Each supported event shall have
a priority assigned to t(DemEventPriority)
Event Occurrence :
DEM provides an Occurrence counter per event memory entry.
related event is entered in the event memory then counter is incremented
by 1.If status bit 0 changes from 0 to 1 then counter is incremented.If the
max value of counter is reached then further increment in the counter
value is not possible.
DEM Concepts
Event kind –
Two different types of events-
BSW related events(Dem_ReportErrorStatus)
SW-C related events(Dem_SetEventStatus)
Event Significance-
Two different significance levels of events:
Fault- classifies a failure which relates to the ECU/component itself.
Occurrence-classifies an issue, which indicates additional information
concerning insufficient system behavior (and relates for example to a
condition out of the ECU’s control)
Event Destination-
Dedicated storage location of the event and event related data.
(DemEventDestination )
There are 4 memory areas i.e. Primary, Secondary, Mirror, Permanent.
DTCOrigin tells where the event related data gets stored.
DEM Concepts
Bit 0 TestFailed
Bit 1 TestFailedThisOperationCycle
Bit 2 PendingDTC
Bit 3 ConfirmedDTC
Bit 4 TestNotCompletedSinceLastClear
Bit 5 TestFailedSinceLastClear
Bit 6 TestNotCompletedThisOperationCycle
Bit 7 WarningIndicatorRequested
Thank u