DiagcMgr_IntegrationManual

Integration Manual

For

Diagnostic Manager

VERSION: 7.0

DATE: 26-APR-2017

Prepared By:

Shruthi Raghavan,

Nexteer Automotive,

Saginaw, MI, USA

Location: The official version of this document is stored in the Nexteer Configuration Management System.

Revision History

Sl. No.DescriptionAuthorVersionDate
1Initial versionSpandana Balani1.023-Apr-2015
2Updated to FDD version 2Spandana Balani2.011-Mar-2016
3Updated to FDD version 3Spandana Balani3.022-APR-2016
4Updated to FDD version 4Spandana Balani4.022-Jun-2016
5Added new parameter in configuratorSpandana Balani5.030-Nov-2016
6Remove Nvm block id for SnpshtDataArySpandana Balani6.007-Dec-2016
7

Add Nvm block id for new LtchCntrAry NVM

Added runnable scheduling for added runnables

Shruthi Raghavan7.026-APR-2017

Table of Contents

1 Abbrevations And Acronyms 4

2 References 5

3 Dependencies 6

3.1 SWCs 6

3.2 Global Functions(Non RTE) to be provided to Integration Project 6

4 Configuration REQUIREMeNTS 7

4.1 Build Time Config. 7

4.2 Configuration Files to be provided by Integration Project 7

4.3 Da Vinci Parameter Configuration Changes 7

4.4 DaVinci Interrupt Configuration Changes 8

4.5 Manual Configuration Changes 8

5 Integration DATAFLOW REQUIREMENTS 9

5.1 Required Global Data Inputs 9

5.2 Required Global Data Outputs 9

5.3 Specific Include Path present 9

6 Runnable Scheduling 10

7 Memory Map REQUIREMENTS 11

7.1 Mapping 11

7.2 Usage 11

7.3 NvM Blocks 11

8 Compiler Settings 12

8.1 Preprocessor MACRO 12

8.2 Optimization Settings 12

9 Appendix 13

Abbrevations And Acronyms

AbbreviationDescription
DFDDesign functional diagram
MDDModule design Document

References

This section lists the title & version of all the documents that are referred for development of this document

Sr. No.TitleVersion
1MDD GuidelinesSee process v04.04.02 document from eRoom here
2EA4 Software Naming ConventionsSee process v04.04.02 document from eRoom here
3Software Design And Coding standardsSee process v04.04.02 document from eRoom here
4FDD – ES101A Diagnostic ManagerSee Synergy Design Subproject Version

Dependencies

SWCs

ModuleRequired Feature
NoneN/A

Note : Referencing the external components should be avoided in most cases. Only in unavoidable circumstance external components should be referred. Developer should track the references.

Global Functions(Non RTE) to be provided to Integration Project

DiagcMgrPwrDwn() –Non RTE Server Runnable, called from BswM.

It calls "SetRamBlockSts" Non-RTE version (NvMProxy_SetRamBlockStatus).

RestoreNtcFltAryDft() , RestoreSnpshtAryDft(), RestoreDiagcMgrLtchCntrAryDft () – Non RTE Server Runnables (callback functions), called from Nvm Manager if the Nvm Data is corrupted.

Configuration REQUIREMeNTS

Only proxies components that have active NTCs should be brought into developer worksace. Stub needs to be integrated for connection to the core's client ports for all the un-implemented applications. Proper .gpj fles needs to be selected for inclusion in the project’s .gpj file.

The Integrator must configure one and only one “/Nexteer/EcucDefs_DiagcMgr/DiagcMgr/DTCEnaCndn” for configured DTC in the DEM

Build Time Config.

ModulesNotes
None

Configuration Files to be provided by Integration Project

DiagcMgr_Cfg.h

DiagcMgr_Cfg.c

Note: Include “DiagcMgr_Cfg.h” in the “Rte_UserTypes.h” header file

Da Vinci Parameter Configuration Changes

ParameterNotesSWC
/Nexteer/EcucDefs_DiagcMgr/DiagcMgrConfiguration of the DiagcMgr moduleDiagcMgr
/Nexteer/EcucDefs_DiagcMgr/DiagcMgr/NTCNRContainer with NTC number propertiesDiagcMgr
/Nexteer/EcucDefs_DiagcMgr/DiagcMgr/NTCNR/NTCOsApplicationRefNTC Os Application. This defines the application corresponding to a particular NTCDiagcMgr
/Nexteer/EcucDefs_DiagcMgr/DiagcMgr/NTCNR/DebounceSet to true if NTC is type debounceDiagcMgr
/Nexteer/EcucDefs_DiagcMgr/DiagcMgr/NTCNR/LtchgEnaSet to true if NTC is latched. Currently only a maximum of 20 Latching NTCs are supported in a project.DiagcMgr
/Nexteer/EcucDefs_DiagcMgr/DiagcMgr/NTCNR/LtchCntrThdSet a value between 1-255 if NTC is latching. Else, the value is ignored & written as 0XFF in the generated file by default when needed.DiagcMgr
/Nexteer/EcucDefs_DiagcMgr/DiagcMgr/NTCNR/MfgNtcInhibInNonOperBoolean Value of <Mfg NTC Inhibit Non-Operate States> column for corresponding NTC in the NTC Master List of the project.DiagcMgr
/Nexteer/EcucDefs_DiagcMgr/DiagcMgr/NTCNR/MfgNtcInhibInOperBoolean Value of <Mfg NTC Inhibit Operate State> column for corresponding NTC in the NTC Master List of the project.DiagcMgr
/Nexteer/EcucDefs_DiagcMgr/DiagcMgr/NTCNR/NtcPwrCycLtchBoolean Value of <NTC Power Cycle Latch> column for corresponding NTC in the NTC Master List of the project.DiagcMgr
/Nexteer/EcucDefs_DiagcMgr/DiagcMgr/DTCEnaCndnContainer with DTC ENABLE CriteriaDiagcMgr
/Nexteer/EcucDefs_DiagcMgr/DiagcMgr/DTCEnaCndn/DTCThis defines the DEM DTC Class.DiagcMgr
/Nexteer/EcucDefs_DiagcMgr/DiagcMgr/DTCEnaCndn/Bit_X1Set to true if Enable Condition for Bit X1 is applicable to configured DTCDiagcMgr
/Nexteer/EcucDefs_DiagcMgr/DiagcMgr/DTCEnaCndn/DiagcMgrDTCIdxValue represents index value DiagcMgr uses internally for NTC mapping to DTCs to the Event ID that the Dem identifies for a particular DTCDiagcMgr
/Nexteer/EcucDefs_DiagcMgr/DiagcMgr/DiagcMgrGeneralContainer with General DiagcMgr configurationDiagcMgr
/Nexteer/EcucDefs_DiagcMgr/DiagcMgr/DiagcMgrGeneral/DIAGCMGR_DEMCHK

Set to true to enable DET consistency check between DEM and DiagcMgr DTC configuration.

This check assumes the Dem will generate the constant table named” Dem_C_DtcTable” that will be sized to the configured DTCs + 1. If this assumption is not true, turn this parameter OFF.

DiagcMgr
/Nexteer/EcucDefs_DiagcMgr/DiagcMgr/DiagcMgrGeneral/DEMTOTNROFDTCThis needs to be configured to an expression that would result in the total number DTCs that are configured in the system based on generated Dem codeDiagcMgr

1 Note: X = _0 to 15

DaVinci Interrupt Configuration Changes

ISR NameVIM #Priority DependencyNotes
N/A

Manual Configuration Changes

ConstantNotesSWC
N/A

Integration DATAFLOW REQUIREMENTS

Required Global Data Inputs

Refer DataDict.m file

Required Global Data Outputs

Refer DataDict.m file

Specific Include Path present

Yes

Runnable Scheduling

This section specifies the required runnable scheduling.

InitScheduling RequirementsTrigger
DiagcMgProxyApplXInit1Init function needs to run before any other init function that is trying to set an NTC and it therefore should be called early on in the initialization tasks.Rte_Init
DiagcMgrInit1To be scheduled after CM102A init & after DiagcMgrProxyApplXInit11RTE Init
RunnableScheduling RequirementsTrigger
DiagcMgrPer1NoneRTE 2ms Task
DiagcMgrPer2NoneRTE 100ms Task
ClrAllDiagc_OperServer RunnableClient Call
ClrLtchCntrData_OperServer RunnableClient Call
ClrSnpshtData_OperServer RunnableClient Call
CnvSnpshtData_<Type>3,5Server RunnableClient Call
DiagcMgrIninCore_OperServer RunnableInternal to DiagcMgr2
GetNtcActvCore_OperServer RunnableInternal to DiagcMgr2
GetNtcQlfrStsCore_OperServer RunnableInternal to DiagcMgr2
GetNtcStsCore_OperServer RunnableInternal to DiagcMgr2
ReadNtcFltAryCore_Oper3Server RunnableClient Call
ReadNtcInfoAndDebCntr_Oper3Server RunnableClient Call
ReadSnpshtData_OperServer RunnableClient Call
SetNtcStsCore_OperServer RunnableInternal to DiagcMgr2
DiagcMgrPwrDwnNon RTE Server RunnableClient Call
RestoreNtcFltAryDftNon RTE Server RunnableClient Call
RestoreDiagcMgrLtchCntrAryDftNon RTE Server RunnableClient Call
ReadLtchCntrDataServer RunnableClient Call
RestoreSnpshtAryDftNon RTE Server RunnableClient Call
DiagcMgrProxyApplXInit11Schedule before DiagcMgrInit1RTE Init
DiagcMgrProxyApplXPer11NoneRTE 10ms Task
GetDiagcDataApplX_Oper1Server RunnableInternal to DiagcMgr2
GetNtcActvX_Oper1,3Server RunnableClient Call
GetNtcDebCntrAppl0_Oper1Server RunnableClient Call
GetNtcInfoApplX_Oper1Server RunnableInternal to DiagcMgr2
GetNtcQlfrStsX_Oper1,3Server RunnableClient Call
GetNtcStsX_Oper1,3Server RunnableClient Call
SetNtcStsX_Oper1,3Server RunnableClient Call
SetNtcStsAndSnpshtDataX_Oper1,3Server RunnableClient Call
UpdDtcEnaCdn4Non RTE Server RunnableClient Call

1X in the Runnable name represent the application number. There 11 applications (0 to 10) and each application has a ProxyDiagcMgr component. One set of these server runnables exist in each proxy component.

2Runnables with trigger ‘Internal to DiagcMgr’ are local to DiagcMgr main component and 11 proxy components, other components will not have access to these functions. Whenever a component inside an application calls one of the server runnables, the ProxyDiagcMgr of that application will make a client call to the DiagcMgr main component.

3These Server Runnables must be defined with “can be invoked concurrently” enabled in Developer.

4This function is assumed to be called by bswm providing periodic updates of DTC enable condition.

DTC enable conditions should be defined by the fault code requirement.

5The <Type> in this function can be f32,logl,s08,s16,s32,u08 or u16

Memory Map REQUIREMENTS

Mapping

Memory SectionContentsNotes
GlobalShared_START_SEC_VAR_NOINIT_UNSPECIFIEDSnpshtDataAry_M

* Each …START_SEC… constant is terminated by a …STOP_SEC… constant as specified in the AUTOSAR Memory Mapping requirements.

Usage

FeatureRAMROM
<Memmap usuage info>

Table 1: ARM Cortex R4 Memory Usage

NvM Blocks

*See DataDict.m

1. This component assumes that the integrator will keep the default NvM block name and the Block ID name will be "NvMConf_NvMBlockDescriptor_Rte_NvmBlock_DiagcMgr_DiagcMgrNtcFltAry” and “NvMConf_NvMBlockDescriptor_Rte_NvmBlock_DiagcMgr_DiagcMgrLtchCntrAry” 2. The shadow RAM for SnpshtDataAry NVM lives in the global variable SnpshtDataAry_M. This should be mapped appropriately.

Compiler Settings

Preprocessor MACRO

None

Optimization Settings

None

Appendix

  1. There is the following compiler warning shows up in the compilation of DiagcMgr.c.

    Justification: The intention of CnvSnpshtData_f32_Oper server runnable is to retain the bits of the single precision float input argument as is in the uint32 output. Typecasting the float32 input to uint32 will not preserve the bits as intended hence this type of casting is required.

Note: We are deviating from MISRA Rule 11.4 (refer static analysis guideline D 11.4.5)

  1. The components that need to be integrated/ brought into the developer project are:

    1. DiagcMgr

    2. DiagcMgrStub

    3. DiagcMgrProxyApplX for each application(#X) that exists in the project.

Note: In DiagcMgr davinci component interface, only the client ports of applications that are present in the project will have server ports to connect to. All the client ports that do not have the corresponding application in the project need to be connected to the corresponding server port in DiagcMgr_Stub component.

Last modified October 12, 2025: Initial commit (af72ad2)