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. | Description | Author | Version | Date |
| 1 | Initial version | Spandana Balani | 1.0 | 23-Apr-2015 |
| 2 | Updated to FDD version 2 | Spandana Balani | 2.0 | 11-Mar-2016 |
| 3 | Updated to FDD version 3 | Spandana Balani | 3.0 | 22-APR-2016 |
| 4 | Updated to FDD version 4 | Spandana Balani | 4.0 | 22-Jun-2016 |
| 5 | Added new parameter in configurator | Spandana Balani | 5.0 | 30-Nov-2016 |
| 6 | Remove Nvm block id for SnpshtDataAry | Spandana Balani | 6.0 | 07-Dec-2016 |
| 7 | Add Nvm block id for new LtchCntrAry NVM Added runnable scheduling for added runnables | Shruthi Raghavan | 7.0 | 26-APR-2017 |
Table of Contents
3.2 Global Functions(Non RTE) to be provided to Integration Project 6
4 Configuration REQUIREMeNTS 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
Abbrevations And Acronyms
| Abbreviation | Description |
| DFD | Design functional diagram |
| MDD | Module design Document |
References
This section lists the title & version of all the documents that are referred for development of this document
| Sr. No. | Title | Version |
| 1 | MDD Guidelines | See process v04.04.02 document from eRoom here |
| 2 | EA4 Software Naming Conventions | See process v04.04.02 document from eRoom here |
| 3 | Software Design And Coding standards | See process v04.04.02 document from eRoom here |
| 4 | FDD – ES101A Diagnostic Manager | See Synergy Design Subproject Version |
Dependencies
SWCs
| Module | Required Feature |
| None | N/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.
| Modules | Notes | |
| 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
| Parameter | Notes | SWC |
| /Nexteer/EcucDefs_DiagcMgr/DiagcMgr | Configuration of the DiagcMgr module | DiagcMgr |
| /Nexteer/EcucDefs_DiagcMgr/DiagcMgr/NTCNR | Container with NTC number properties | DiagcMgr |
| /Nexteer/EcucDefs_DiagcMgr/DiagcMgr/NTCNR/NTCOsApplicationRef | NTC Os Application. This defines the application corresponding to a particular NTC | DiagcMgr |
| /Nexteer/EcucDefs_DiagcMgr/DiagcMgr/NTCNR/Debounce | Set to true if NTC is type debounce | DiagcMgr |
| /Nexteer/EcucDefs_DiagcMgr/DiagcMgr/NTCNR/LtchgEna | Set 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/LtchCntrThd | Set 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/MfgNtcInhibInNonOper | Boolean 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/MfgNtcInhibInOper | Boolean 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/NtcPwrCycLtch | Boolean Value of <NTC Power Cycle Latch> column for corresponding NTC in the NTC Master List of the project. | DiagcMgr |
| /Nexteer/EcucDefs_DiagcMgr/DiagcMgr/DTCEnaCndn | Container with DTC ENABLE Criteria | DiagcMgr |
| /Nexteer/EcucDefs_DiagcMgr/DiagcMgr/DTCEnaCndn/DTC | This defines the DEM DTC Class. | DiagcMgr |
| /Nexteer/EcucDefs_DiagcMgr/DiagcMgr/DTCEnaCndn/Bit_X1 | Set to true if Enable Condition for Bit X1 is applicable to configured DTC | DiagcMgr |
| /Nexteer/EcucDefs_DiagcMgr/DiagcMgr/DTCEnaCndn/DiagcMgrDTCIdx | Value represents index value DiagcMgr uses internally for NTC mapping to DTCs to the Event ID that the Dem identifies for a particular DTC | DiagcMgr |
| /Nexteer/EcucDefs_DiagcMgr/DiagcMgr/DiagcMgrGeneral | Container with General DiagcMgr configuration | DiagcMgr |
| /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/DEMTOTNROFDTC | This 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 code | DiagcMgr |
1 Note: X = _0 to 15
DaVinci Interrupt Configuration Changes
| ISR Name | VIM # | Priority Dependency | Notes |
| N/A |
Manual Configuration Changes
| Constant | Notes | SWC |
| 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.
| Init | Scheduling Requirements | Trigger |
| DiagcMgProxyApplXInit1 | Init 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 |
| DiagcMgrInit1 | To be scheduled after CM102A init & after DiagcMgrProxyApplXInit11 | RTE Init |
| Runnable | Scheduling Requirements | Trigger |
| DiagcMgrPer1 | None | RTE 2ms Task |
| DiagcMgrPer2 | None | RTE 100ms Task |
| ClrAllDiagc_Oper | Server Runnable | Client Call |
| ClrLtchCntrData_Oper | Server Runnable | Client Call |
| ClrSnpshtData_Oper | Server Runnable | Client Call |
| CnvSnpshtData_<Type>3,5 | Server Runnable | Client Call |
| DiagcMgrIninCore_Oper | Server Runnable | Internal to DiagcMgr2 |
| GetNtcActvCore_Oper | Server Runnable | Internal to DiagcMgr2 |
| GetNtcQlfrStsCore_Oper | Server Runnable | Internal to DiagcMgr2 |
| GetNtcStsCore_Oper | Server Runnable | Internal to DiagcMgr2 |
| ReadNtcFltAryCore_Oper3 | Server Runnable | Client Call |
| ReadNtcInfoAndDebCntr_Oper3 | Server Runnable | Client Call |
| ReadSnpshtData_Oper | Server Runnable | Client Call |
| SetNtcStsCore_Oper | Server Runnable | Internal to DiagcMgr2 |
| DiagcMgrPwrDwn | Non RTE Server Runnable | Client Call |
| RestoreNtcFltAryDft | Non RTE Server Runnable | Client Call |
| RestoreDiagcMgrLtchCntrAryDft | Non RTE Server Runnable | Client Call |
| ReadLtchCntrData | Server Runnable | Client Call |
| RestoreSnpshtAryDft | Non RTE Server Runnable | Client Call |
| DiagcMgrProxyApplXInit11 | Schedule before DiagcMgrInit1 | RTE Init |
| DiagcMgrProxyApplXPer11 | None | RTE 10ms Task |
| GetDiagcDataApplX_Oper1 | Server Runnable | Internal to DiagcMgr2 |
| GetNtcActvX_Oper1,3 | Server Runnable | Client Call |
| GetNtcDebCntrAppl0_Oper1 | Server Runnable | Client Call |
| GetNtcInfoApplX_Oper1 | Server Runnable | Internal to DiagcMgr2 |
| GetNtcQlfrStsX_Oper1,3 | Server Runnable | Client Call |
| GetNtcStsX_Oper1,3 | Server Runnable | Client Call |
| SetNtcStsX_Oper1,3 | Server Runnable | Client Call |
| SetNtcStsAndSnpshtDataX_Oper1,3 | Server Runnable | Client Call |
| UpdDtcEnaCdn4 | Non RTE Server Runnable | Client 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 Section | Contents | Notes |
| GlobalShared_START_SEC_VAR_NOINIT_UNSPECIFIED | SnpshtDataAry_M | |
* Each …START_SEC… constant is terminated by a …STOP_SEC… constant as specified in the AUTOSAR Memory Mapping requirements.
Usage
| Feature | RAM | ROM |
| <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
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)
The components that need to be integrated/ brought into the developer project are:
DiagcMgr
DiagcMgrStub
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.