4 - 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
VersionDateChanged byDescription5.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
CompanyBayerische
Motoren Werke
Aktiengesellschaft
Postal addressBMW AG
80788 München
Office addressForschungs- und
Innovationszentrum
(FIZ)
Hufelandstr. 1
80937 München
TelephoneSwitchboard
+49 89 382-0
Internetwww.bmwgroup.com
DarhClassic_IntegrationManual.pdf, Version 5.1.0, Software Platforms
Page 1 of 13
Table of Contents1 Introduction41.1Functional overview4
2 Related documentation53 Limitations64 Software Architecture74.1Dependencies on AUTOSAR modules7
4.1.1RTE7
4.1.2Det7
4.1.3Dcm7
4.1.4Dem7
4.1.5Nvm7
4.2Dependencies to other modules7
5 Integration85.1Configuration of other Modules8
5.1.1Dcm8
5.1.1.1Read Data By Identifer8
5.1.1.2Routine Control8
5.1.2NvM8
5.1.3Dem9
5.1.3.1Event9
5.1.4Det9
5.1.5BswM9
5.1.6Com10
5.2Configuration10
5.2.1DarhGeneral10
5.2.1.1DarhDevErrorDetect10
5.2.1.2DarhQueueHandlerCycleTime10
5.2.2DarhQueueSize10
5.2.3DarhActiveReportListType10
5.2.4DarhActiveReportedEvent11
5.3Configuration of the RTE11
5.3.1Event Mapping11
5.3.2Data Mapping11
5.3.2.1Dcm11
5.3.2.2Det11
5.3.3Dem11
5.3.4NvM12
5.3.5BswM12
5.3.6NvM12
5.3.7User SWC12
5.3.8Exclusive Areas12
5.4Software Integration12
5.4.1Startup/Initialization13
DarhClassic_IntegrationManual.pdf, Version 5.1.0, Software Platforms
Page 2 of 13
5.4.2Normal Operation13
5.4.3Shutdown/Deactivation13
DarhClassic_IntegrationManual.pdf, Version 5.1.0, Software Platforms
Page 3 of 13
1IntroductionThis Integration Manual describes the basis functionality, API and the configuration and integration of the
BMW System Function Darh.
Functional overviewThe 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
2Related documentationReferencesDarhClassic_IntegrationManual.pdf, Version 5.1.0, Software Platforms
Page 5 of 13
3LimitationsNo limitations are known.
DarhClassic_IntegrationManual.pdf, Version 5.1.0, Software Platforms
Page 6 of 13
4Software ArchitectureDependencies on AUTOSAR modulesThe current version of the Module Darh depends on the following BSW modules:
RTEAs 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.
DetIn case Det usage is enabled in the Darh configuration, Darh will report development errors by using the
Det functionality.
DcmThe 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.
DemThe 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.
NvmThe 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 modulesDarh does not have dependencies to other modules.
DarhClassic_IntegrationManual.pdf, Version 5.1.0, Software Platforms
Page 7 of 13
5IntegrationConfiguration of other ModulesThe following modules shall be configured, before this module can be generated, compiled and linked.
DcmRead Data By IdentiferThe 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 ControlTwo 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
NvMThe 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
DemEventTwo 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
DetA Darh entry shall be added to the Software Component List from Det.
BswMThe 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
ComThe 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.
ConfigurationThe Darh configuration contains the following containers:
Darh General
DarhActiveReportEvent
DarhGeneralThis container contains the configuration (parameters) of the Darh
DarhDevErrorDetectActivate/Deactivate the Development Error Detection and Notification. true: Development Error Detection
and Notification activated false: Development Error Detection and Notification deactivated.
DarhQueueHandlerCycleTimeCycle 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)DarhQueueSizeMax. number of entries (of type Darh_QueueElementType) the queue can contain.
DarhActiveReportListTypeThis 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).
DarhActiveReportedEventThis 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 RTEEvent MappingThe followings runnable entities shall be mapped:
Init (triggers the Darh function Darh_Init)
QueueHandler (triggers the Darh function Darh_QueueHandler).
Data MappingDcmThe 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.
DetThe port DetPort shall be connected to the Det generated service port.
DemThe 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
NvMThe port NvMServicePort shall be connected to the NvM generated service port see 6.1. NvM.
BswMThe 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.
NvMThe 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 SWCIt 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 AreasThe Darh uses one exclusive area. The exclusive area shall be configured within the RTE.
Software IntegrationThe 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/InitializationThe 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 OperationIf 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/DeactivationThe 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
7 - DarhClassic_ReleaseNotess

Release Notes DarhClassic
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
VersionDateIssues5.1.0
2017-12-14
BAC-6651
5.0.2
2017-11-09
BAC-6506
5.0.1
2017-10-12
BAC-6345, BAC-6196
5.0.0
2017-06-29
CompanyBayerische
Motoren Werke
Aktiengesellschaft
Postal addressBMW AG
80788 München
Office addressForschungs- und
Innovationszentrum
(FIZ)
Hufelandstr. 1
80937 München
TelephoneSwitchboard
+49 89 382-0
Internetwww.bmwgroup.com
ReleaseNotes_DarhClassic, Version 5.1.0, Software Platforms
Page 1 of 3
1Module DescriptionThe 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.
2Revisions and ModificationsRevision 5.1.0 [Released]ItemDescriptionCR ID:
BAC-6651
CR Headline:
Darh: only 1 DTC shall be transmitted at a time
Description of Issues:
Darh transmit one DTC each time.
Description of Changes:
Due to an update on the LH and the BNE the Darh will transmit
only one DTC and timestamp each time.
Changed Files:
doc/DarhClassic_IntegrationManual.pdf
src/Darh_ApplAdapter.c
generate/meta/Darh_ext_interfaces.arxml.pgen
generate/meta/Darh_internal.arxml.pgen
Compatibility:
Revision 5.0.2 [Released]ItemDescriptionCR ID:
BAC-6506
CR Headline:
Adapt pgen templates to PAGe v1.1.0
Description of Issues:
Adapt pgen files to PAGe v1.1.0.
Description of Changes:
Adapted pgen files to PAGe v1.1.0.
Changed Files:
generate/meta/Darh_ext_interfaces.arxml.pgen
generate/include/DarhClassic_Cfg.h.pgen
generate/meta/Darh_internal.arxml.pgen
Compatibility:
Revision 5.0.1 [Released]ItemDescriptionCR ID:
BAC-6345
CR Headline:
Darh: Dem_EventIdType has to be uint16
ReleaseNotes_DarhClassic, Version 5.1.0, Software Platforms
Page 2 of 3

Description of Issues:
Dem_EventIdType is defined in AUTOSAR as uint16 and not
uint32.
Description of Changes:
Dem_EventIdType has been changed to uint16.
Changed Files:
generate/meta/Darh_ext_interfaces.arxml.pgen
src/Darh_ApplAdapter.c
Compatibility:
ItemDescriptionCR ID:
BAC-6196
CR Headline:
Darh: Implementation of Darh_SetRoeSuspendedHandler()
missing
Description of Issues:
The runnable SetRoeSuspended was not implemented in code.
Description of Changes:
The runnable SetRoeSuspended with the Symbol
Darh_SetRoeSuspendedHandler has been implemented.
Changed Files:
src/Darh_ApplAdapter.c
Compatibility:
Revision 5.0.0 [Released]ItemDescriptionCR ID:
CR Headline:
Initial Release for SP2021
Description of Issues:
Initial Release for SP2021
Description of Changes:
Initial Release for SP2021
Changed Files:
Compatibility:
ReleaseNotes_DarhClassic, Version 5.1.0, Software Platforms
Page 3 of 3
Document Outline
13 - DarhGeneric_ReleaseNotess

Release Notes DarhGeneric
Project
BMW AUTOSAR Core 4 Rel. 3 and adaptive BMW AUTOSAR Core Rel. 1
Author
BMW AG
Release Date
2017-12-14
Version
5.1.0
Status
Release
Hotline
+49 89 382 - 32233 (classic) / +49 89 382 - 22522 (adaptive)
Contact
bac@bmw.de (classic) / abac@bmw.de (adaptive)
https://asc.bmw.com/jira/browse/BSUP (extern)
https://asc.bmwgroup.net/jira/browse/BSUP (intern)
Revision History
VersionDateIssues5.1.0
2017-12-14
BAC-6651
5.0.1
2017-10-12
BAC-6245
5.0.0
2017-06-29
CompanyBayerische
Motoren Werke
Aktiengesellschaft
Postal addressBMW AG
80788 München
Office addressForschungs- und
Innovationszentrum
(FIZ)
Hufelandstr. 1
80937 München
TelephoneSwitchboard
+49 89 382-0
Internetwww.bmwgroup.com
ReleaseNotes_DarhGeneric, Version 5.1.0, Software Platforms
Page 1 of 2
1Module DescriptionThe 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.
2Revisions and ModificationsRevision 5.1.0 [Released]ItemDescriptionCR ID:
BAC-6651
CR Headline:
Darh: only 1 DTC shall be transmitted at a time
Description of Issues:
Darh transmit one DTC each time.
Description of Changes:
Due to an update on the LH and the BNE the Darh will transmit
only one DTC and timestamp each time.
Changed Files:
src/Darh_QueueHandler.c
Compatibility:
Revision 5.0.1 [Released]ItemDescriptionCR ID:
BAC-6245
CR Headline:
Darh: Improve Requirements Traceability
Description of Issues:
Fix reference to Lastenheft and add requirements from
IntegrationManual to RequirementsTable.
Description of Changes:
Fixed LH reference and added requirements from
IntegrationManual to RequirementsTable.
Changed Files:
doc/DarhGeneric_RequirementsTable.pdf
Compatibility:
Revision 5.0.0 [Released]ItemDescriptionCR ID:
CR Headline:
Initial Release for SP2021
Description of Issues:
Initial Release for SP2021
Description of Changes:
Initial Release for SP2021
Changed Files:
Compatibility:
ReleaseNotes_DarhGeneric, Version 5.1.0, Software Platforms
Page 2 of 2
Document Outline