DarhClassic_IntegrationManuals

Darh Classic Integration Manual
Project
BMW AUTOSAR 4 Core Rel. 3
Author
BMW AG
Release Date
2017-12-14
Version
5.1.0
Status
Release
Hotline
+49 89 382 - 32233
Contact
bac@bmw.de
https://asc.bmw.com/jira/browse/BSUP (extern)
https://asc.bmwgroup.net/jira/browse/BSUP (intern)
Revision History
Version
Date
Changed by
Description
5.1.0
2017-12-14
JC-42
Document use of the Com port
5.0.2
2017-11-09
JC-42
Version Update
5.0.1
2017-10-12
JC-42
Version Update
5.0.0
2017-04-13
Mariano
Initial version for SP2021
Cerdeiro
Company
Bayerische
Motoren Werke
Aktiengesellschaft
Postal address
BMW AG
80788 München
Office address
Forschungs- und
Innovationszentrum
(FIZ)
Hufelandstr. 1
80937 München
Telephone
Switchboard
+49 89 382-0
Internet
www.bmwgroup.com
DarhClassic_IntegrationManual.pdf, Version 5.1.0, Software Platforms
Page 1 of 13

Table of Contents
1 Introduction
4
1.1
Functional overview
4
2 Related documentation
5
3 Limitations
6
4 Software Architecture
7
4.1
Dependencies on AUTOSAR modules
7
4.1.1
RTE
7
4.1.2
Det
7
4.1.3
Dcm
7
4.1.4
Dem
7
4.1.5
Nvm
7
4.2
Dependencies to other modules
7
5 Integration
8
5.1
Configuration of other Modules
8
5.1.1
Dcm
8
5.1.1.1
Read Data By Identifer
8
5.1.1.2
Routine Control
8
5.1.2
NvM
8
5.1.3
Dem
9
5.1.3.1
Event
9
5.1.4
Det
9
5.1.5
BswM
9
5.1.6
Com
10
5.2
Configuration
10
5.2.1
DarhGeneral
10
5.2.1.1
DarhDevErrorDetect
10
5.2.1.2
DarhQueueHandlerCycleTime
10
5.2.2
DarhQueueSize
10
5.2.3
DarhActiveReportListType
10
5.2.4
DarhActiveReportedEvent
11
5.3
Configuration of the RTE
11
5.3.1
Event Mapping
11
5.3.2
Data Mapping
11
5.3.2.1
Dcm
11
5.3.2.2
Det
11
5.3.3
Dem
11
5.3.4
NvM
12
5.3.5
BswM
12
5.3.6
NvM
12
5.3.7
User SWC
12
5.3.8
Exclusive Areas
12
5.4
Software Integration
12
5.4.1
Startup/Initialization
13
DarhClassic_IntegrationManual.pdf, Version 5.1.0, Software Platforms
Page 2 of 13

5.4.2
Normal Operation
13
5.4.3
Shutdown/Deactivation
13
DarhClassic_IntegrationManual.pdf, Version 5.1.0, Software Platforms
Page 3 of 13

1
Introduction
This Integration Manual describes the basis functionality, API and the configuration and integration of the
BMW System Function Darh.
Functional overview
The main objective of the Darh functionality is to send errors that occurred locally in the ECU and are
reported to the Dem to a central master over the system bus. The idea is to collect errors of the individual
ECUs in the vehicle in one central place to allow later analysis of error correlations between the different
ECUs.
For this purpose, errors are sent to the master containing timestamp information. This allows deducing
the order in which errors occurred in the complete system and helps to find out the original reason of a
complex causal loop.
The Darh module itself is modeled as an AUTOSAR software component (SWC).
DarhClassic_IntegrationManual.pdf, Version 5.1.0, Software Platforms
Page 4 of 13

2
Related documentation
References
DarhClassic_IntegrationManual.pdf, Version 5.1.0, Software Platforms
Page 5 of 13

3
Limitations
No limitations are known.
DarhClassic_IntegrationManual.pdf, Version 5.1.0, Software Platforms
Page 6 of 13

4
Software Architecture
Dependencies on AUTOSAR modules
The current version of the Module Darh depends on the following BSW modules:
RTE
As a software component, the Darh module uses RTE client/server communication to communicate with
other SWCs and BSW. Additionally the scheduling is done by the RTE.
Det
In case Det usage is enabled in the Darh configuration, Darh will report development errors by using the
Det functionality.
Dcm
The Darh is tightly coupled with the Dcm. The Darh implements certain RDBI and RC services. Dcm shall
be configured in a way, that it dispatches theses jobs to the Darh SWC.
Dem
The Darh receives general callbacks of the Dem in case event related data changed. Additionally the Darh
controls specific events via ClientServerInterface DiagnosticMonitor of the Dem.
Nvm
The Darh uses the NvM to store and read the content of the error queue which shall be stored on non
volatile memory at shutdown and restored at startup. Darh also stores if the tranmission is enabled or not.
Dependencies to other modules
Darh does not have dependencies to other modules.
DarhClassic_IntegrationManual.pdf, Version 5.1.0, Software Platforms
Page 7 of 13

5
Integration
Configuration of other Modules
The following modules shall be configured, before this module can be generated, compiled and linked.
Dcm
Read Data By Identifer
The RDBI command 22 17 23 shall be configured within Dcm:
DcmDspDataSize shall be long enough to store the complete list of DTC configured within Darh
(DarhActiveReportedEvent). Greater than count of DarhActiveReportedEvent * 3.
DcmDspDataInfoRef shall reference to DcmDspDataInfo with DcmDspDataFixedLength set to false
DcmDspDataUsePort shall be set to USE_DATA_SYNCH_CLIENT_SERVER
DID shall be configured to be read in all sessions and security levels
Routine Control
Two Routine Control command shall be configured within Dcm.
One used to trigger two Dummy DTCs (31 01 03 04):
DcmDspRoutineFixedLength shall be true
DcmDspRoutineUsePort shall be true
Only DcmDspStartRoutineIn shall be configured
DcmDspRoutineSignalLength shall be set to 8
DcmDspRoutineSignalPos shall be set to 0
DcmDspStartRoutineOut
4 paramters with a length of 8 bits shall be configured
DcmDspRoutineSignalPos shall be set to 0, 8, 16, and 24.
[] dThe second one to start and stop the transmission to the diagnose master (31 0x 40 0A):
c(DMA_PA_9154)
DcmDspRoutineFixedLength shall be true
DcmDspRoutineUsePort shall be true
Neither input or output parameters are needed
Start and Stop sub services shall be supported
NvM
The Darh needs 2 NvM blocks to store the event queue and the status of the transmission.
The variable Darh_ErrorQueue shall be mapped to the NvM block:
DarhClassic_IntegrationManual.pdf, Version 5.1.0, Software Platforms
Page 8 of 13

Darh_ErrorQueue
Block size shall be set to the size of Darh_ErrorQueue
Ram block address shall be set to Darh_ErrorQueue
Rom block address shall be left empty. The default value shall be 0
NvmBlockManagementType shall be set to NVM_BLOCK_NATIVE
NvmBlockUseCrc shall be set to true
NvmSelectBlockForReadall shall be set to true
NvMSelectBlockForWriteAll shall be set to true
Darh_DiagnoseMasterEnable
Block size shall be set to the size of boolean
Ram block address shall be set to Darh_DiagnoseMasterEnable
Rom block address shall be left empty.
NvmBlockManagementType shall be set to NVM_BLOCK_NATIVE
NvmSelectBlockForReadall shall be set to true
NvMSelectBlockForWriteAll shall be set to false
Dem
Event
Two Dem events shall be configured for Darh:
DTC vale shall be set to 0xC90400 + (0x4000 * ECUDiagnosticAddress) + 0x07FF
Event destination: primary origin
Event kind: DEM_EVENT_KIND_SWC
Description: Dummy Network DTC
DTC vale shall be set to 0x02FF00 + ECUDiagnosticAddress
Event destination: primary origin
Event kind: DEM_EVENT_KIND_SWC
Description: Dummy Application DTC
Det
A Darh entry shall be added to the Software Component List from Det.
BswM
The BswM controls the states of the Darh module.
BswMModeRequestPort for the Darh operation mode
BswMRules to switch the Darh operation mode
BswMRteSwitch actions for the Darh operation mode
DarhClassic_IntegrationManual.pdf, Version 5.1.0, Software Platforms
Page 9 of 13

Com
The Darh requires a IPDU Multiplexer PDU for the transmission of the DTCs and their corresponding
timestamp to the diagnostic master ECU. The Com port shall be connected to the corresponding port in
Com. At the moment of this release there was not definition in the BNE regarding this PDU.
Configuration
The Darh configuration contains the following containers:
Darh General
DarhActiveReportEvent
DarhGeneral
This container contains the configuration (parameters) of the Darh
DarhDevErrorDetect
Activate/Deactivate the Development Error Detection and Notification. true: Development Error Detection
and Notification activated false: Development Error Detection and Notification deactivated.
DarhQueueHandlerCycleTime
Cycle time of the Queue handler functionality. This value determines in which interval the queue is
checked for pending entries that have to be sent to the Diagnose Master.
[] dThe valid range is between 1 and 16 seconds, but the delay between a Event is Report by the Dem
and the transmission to the master shall be less than 10 seconds. c(DMA_PA_5762, DMA_PA_8248)
DarhQueueSize
Max. number of entries (of type Darh_QueueElementType) the queue can contain.
DarhActiveReportListType
This parameter defines how and if Darh handles the DarhActiveReportedEvent to report errors to the
Diagnose Master.
If configured to POSITIVE_LIST the event listed in DarhActiveReportedEvent are those reported to the
Diagnose Master (mode compatible to Darh in SP2015). If configured to DYNAMICALLY the events listed
in DarhActiveReportedEvent are ignored, the Operation EventToReport of the Client Server Interface
DarhClassic_IntegrationManual.pdf, Version 5.1.0, Software Platforms
Page 10 of 13

DarhReportDynamicallyEvent (over the port ReportDynamicallyEventPort) is used to check if a specific
event shall be reported to Diagnose Master.
NOTE: NEGATIVE_LIST is not more supported in SP2021 (BAC4 Rel. 3).
DarhActiveReportedEvent
This container contains the Dem events to be reported to the Darh master.
[] dPlease refer to
DMAP A8415andDMAP A8417toincludeinthislistthecorrectDT Cs/Eventstobereported.c(DMA_PA_8415,
DMA_PA_8417)
Configuration of the RTE
Event Mapping
The followings runnable entities shall be mapped:
Init (triggers the Darh function Darh_Init)
QueueHandler (triggers the Darh function Darh_QueueHandler).
Data Mapping
Dcm
The port ActivelyReportedDtcPort shall be connected to the Dcm generated DataService_<xxx> see
6.1 Dcm.
The port TriggerDTCPort shall be connected to the Dcm generated RoutineService_<xxx> see 6.1
Dcm.
Det
The port DetPort shall be connected to the Det generated service port.
Dem
The ApplicationDTCInfoPort shall be connected to the Dem generated EvtInfo_<xxx>.
The ApplicationDTCPort shall be connected to the Dem generated Event_<xxx>.
The NetworkDTCInfoPort shall be connected to the Dem generated EvtInfo_<xxx>.
The NetworkDTCPort shall be connected to the Dem generated Event_<xxx>.
DarhClassic_IntegrationManual.pdf, Version 5.1.0, Software Platforms
Page 11 of 13

NvM
The port NvMServicePort shall be connected to the NvM generated service port see 6.1. NvM.
BswM
The port notificationDarhModePort shall be connected to the BswM generated mode switch port see
6.1 BswM.
The port requestDarhModePort shall be connected to the BswM generated mode request port see 6.1
BswM.
The port DarhReportErrorMode shall be connected to the BswM generated mode request port see 6.1
BswM.
NvM
The port DiagnoseMasterStatus shall be connected to the NvM port created for the NvM block
Darh_DiagnoseMasterEnable.
The port ErrorQueueBlock shall be connected to the NvM port created for the NvM block
Darh_ErrorQueue.
User SWC
It the configuration parameter DarhActiveReportListType is set to DYNAMICALLY the port
ReportDynamicallyEventPort shall be connected to a user implemented SWC which indicates which
Events shall be reported to the Diagnose Master.
This CSI shall implement the following methods:
EventToReportCount: shall return the count of events to be reported.
EventIdx2EventId: shall return the event (intsance ID) for an event index between 0 and GetEventCount.
EventToReport: shall return if a specific event (instance ID) shall be reported or not.
Exclusive Areas
The Darh uses one exclusive area. The exclusive area shall be configured within the RTE.
Software Integration
The SWC description file has to be updated manually after the Dcm configuration.
After generating the Dem and Dcm SWC description files the integrator shall perform changes within
Darh_ext_interface.arxml.tt to make the RTE interfaces between Dcm/Dem and Darh compatible from
RTE point of view.
DarhClassic_IntegrationManual.pdf, Version 5.1.0, Software Platforms
Page 12 of 13

Within the Darh_ext_interface.arxml.tt the <ARRAY-SIZE> of the parameters Dem_MaxDataValueType
and Dcm_RequestData_ArrayType shall be set to the vaules given by Dcm and Dem.
The size of the parameter Dem_MaxDataValueType shall be set to the length indicated within the Dem
client server interface GeneralDiagnosticInfo, the operation GetEventFreezeFrameData the parameter
FFData. The size of the parameter Dcm_RequestData_ArrayType shall be set to the length indicated
within the Dcm interface ServiceRequestNotification, the operation Indication the parameter
RequestData.
Startup/Initialization
The NvM ReadAll shall be complete before the Darh mode DARH_INIT is switched.
The Darh will request an DARH_RUN after initialization is completed.
The BswM shall switch the Darh Mode to DARH_RUN when the DARH requests this mode.
While in DARH_RUN the Darh will receive and store errors but will not transmit them to the Diagnose
Master.
The BswM shall switch the Darh ReportErrorMode to DARH_REPORT_ERROR_ACTIVE to activate the
transmission of the errors to the Diagnose Master, this may be performed for example when
COM_FULL_COMMUNICATION is requested.
To request a specific state the user shall use the port LifeCycleRequest.
Normal Operation
If needed the BswM may switch the Darh ReportErrorMode to DARH_REPORT_ERROR_INACTIVE to
disable the transmission of errors to the Diagnose Master. To activate the transmission again the mode
DARH_REPORT_ERROR_ACTIVE shall be set again.
Shutdown/Deactivation
The BswM shall switch the Darh Mode to DARH_STOP to stop the Darh SW-C.
DarhClassic_IntegrationManual.pdf, Version 5.1.0, Software Platforms
Page 13 of 13
Document Outline
- 1 Introduction
- 2 Related documentation
- 3 Limitations
- 4 Software Architecture
- 5 Integration