CurrMeas_MDD

Module Design Document

For

CurrMeas

Mar 23, 2018

Prepared For:

Software Engineering

Nexteer Automotive,

Saginaw, MI, USA

Prepared By:

Software Group,

Nexteer Automotive,

Saginaw, MI, USA
Change History

DescriptionAuthorVersionDate
Initial VersionKrzysztof Byrski1.019-May-2017
Fixed anomaly EA4#13330 by using required NVM blocks as applicableKrishna Anne2.016-Oct-17
Created local functions for reducing the complexity of OffsetCalibration and GainCalibration functionsMrudula Paturi3.023-Mar-18


Table of Contents

1 Introduction 5

1.1 Purpose 5

1.2 Scope 5

2 CurrMeas & High-Level Description 6

3 Design details of software module 7

3.1 Graphical representation of CurrMeas 7

3.2 Data Flow Diagram 7

3.2.1 Component level DFD 7

3.2.2 Function level DFD 7

4 Constant Data Dictionary 8

4.1 Program (fixed) Constants 8

4.1.1 Embedded Constants 8

5 Software Component Implementation 9

5.1 Sub-Module Functions 9

5.1.1 Init: CurrMeasInit1 9

5.1.2 Per: CurrMeasPer1 9

5.1.3 Per: CurrMeasPer2 9

5.1.4 Per: CurrMeasPer3 10

5.2 Server Runables 11

5.2.1 CurrMeasEolGainReq_Oper 11

5.2.2 CurrMeasEolGainStsReq_Oper 11

5.2.3 CurrMeasEolOffsReq_Oper 11

5.2.4 CurrMeasEolOffsStsReq_Oper 11

5.2.5 CurrMeasGainReadReqSngIvtr_Oper 11

5.2.6 CurrMeasGainWrReqSngIvtr_Oper 11

5.2.7 CurrMeasOffsReadReqSngIvtr_Oper 12

5.2.8 CurrMeasOffsWrReqSngIvtr_Oper 12

5.3 Interrupt Functions 13

5.4 Module Internal (Local) Functions 13

5.4.1 OffsetCalibration 13

5.4.2 GainCalibration 14

5.4.3 RangeChkWIABC 14

5.4.4 ProtocolChkENABC 15

5.4.5 CalcMotCurrMotAgCorrd 15

5.4.6 CalMotCurrCorrdABC 15

5.4.7 OffsCalcABC 16

5.5 GLOBAL Function/Macro Definitions 17

6 Known Limitations with Design 18

7 UNIT TEST CONSIDERATION 19

Appendix A Abbreviations and Acronyms 20

Appendix B Glossary 21

Appendix C References 22

Introduction

Purpose

Module Design Document for ES200B_CurrMeas.

Scope

The following definitions are used throughout this document:

  • Shall: indicates a mandatory requirement without exception in compliance.

  • Should: indicates a mandatory requirement; exceptions allowed only with documented justification.

  • May: indicates an optional action.

CurrMeas & High-Level Description

Refer FDD.

Design details of software module

Graphical representation of CurrMeas

Data Flow Diagram

Refer FDD

Component level DFD

None

Function level DFD

None

Constant Data Dictionary

Program (fixed) Constants

Embedded Constants

Local Constants

Constant NameResolutionUnitsValue
CALPROCNOTSTRTD_CNT_U081Cnt0
CALPROCSTRTD_CNT_U081Cnt1
CALPROCPASS_CNT_U081Cnt2
CALPROCPHAABCEOLOUTOFRNG_CNT_U081Cnt4
CALPROCVEHSPDCNDNOTMET_CNT_U081Cnt16
CALPROCMOTVELMRFCNDNOTMET_CNT_U081Cnt64
VEHSPDCDNNOTMET_CNT_U081Cnt4
MOTVELMRFCDNNOTMET_CNT_U081Cnt8
DIAGCSTSINVTRINACTV_CNT_U081Cnt16
FAILDATENA_CNT_U081Cnt2
FAILDATWRMININ_CNT_U081Cnt3
INVTRINACTV_CNT_U081Cnt8
DIFOFFSRNGCHKMAX_VOLT_F32Single precision floatVolt1.0
DEGREES30_MOTRAD_F32Single precision floatMotRad0.5236
MAXCURRCORRD_AMPR_F32Single precision floatAmpr200.0
PHAONTIBCOK_CNT_U081Cnt0x03
PHAONTIACOK_CNT_U081Cnt0x05
PHAONTIABOK_CNT_U081Cnt0x06
PHAONTIABCOK_CNT_U081Cnt0x07
PHAONTIA_CNT_U081Cnt0x04
PHAONTIB_CNT_U081Cnt0x02
PHAONTIC_CNT_U081Cnt0x01
NANOSECTOSEC_ULS_F32Single precision floatUls0.000000001

Software Component Implementation

Sub-Module Functions

Init: Init1

Design Rationale

Refer FDD

Module Outputs

Refer FDD

Per: Per1

Design Rationale

Refer FDD

Store Module Inputs to Local copies

Refer FDD

(Processing of function)………

Refer FDD

Store Local copy of outputs into Module Outputs

Refer FDD

Per: Per2

Design Rationale

Refer FDD

Store Module Inputs to Local copies

Refer FDD

(Processing of function)………

Refer FDD

Store Local copy of outputs into Module Outputs

Refer FDD

Per: Per3

Design Rationale

Refer FDD

Store Module Inputs to Local copies

Refer FDD

(Processing of function)………

Refer FDD

Store Local copy of outputs into Module Outputs

Refer FDD

Server Runables

CurrMeasEolGainReq_Oper

Design Rationale

Refer FDD

(Processing of function)………

Refer FDD

CurrMeasEolGainStsReq_Oper

Design Rationale

Refer FDD

(Processing of function)………

Refer FDD

CurrMeasEolOffsReq_Oper

Design Rationale

Refer FDD

(Processing of function)………

Refer FDD

CurrMeasEolOffsStsReq_Oper

Design Rationale

Refer FDD

CurrMeasGainReadReqSngIvtr_Oper

Design Rationale

Refer FDD

(Processing of function)………

Refer FDD

CurrMeasGainWrReqSngIvtr_Oper

Design Rationale

Refer FDD

(Processing of function)………

Refer FDD

CurrMeasOffsReadReqSngIvtr_Oper

Design Rationale

Refer FDD

(Processing of function)………

Refer FDD

CurrMeasOffsWrReqSngIvtr_Oper

Design Rationale

Refer FDD

(Processing of function)………

Refer FDD

Interrupt Functions

None

Module Internal (Local) Functions

OffsetCalibration

Function NameOffsetCalibrationTypeMinMax
Arguments PassedMotCurrAdcVlyA_Volt_T_f32float320.05.0
MotCurrAdcVlyB_Volt_T_f32float320.05.0
MotCurrAdcVlyC_Volt_T_f32float320.05.0
MotVelMrf_MotRadPerSec_T_f32float32-1350.01350.0
VehSpd_Kph_T_f32float320.0511.0
VehSpdVld_Cnt_T_loglbooleanFALSETRUE
BrdgVltg_Volt_T_f32float326.026.5
DiagcStsIvtr1Inactv_Cnt_T_loglbooleanFALSETRUE
Return ValueN/A---

Design Rationale

Refer FDD

Processing

Refer FDD

GainCalibration

Function NameGainCalibrationTypeMinMax
Arguments PassedMotCurrEolOffsProcFlg_Cnt_T_loglbooleanFALSETRUE
MotCurrAdcVlyA_Volt_T_f32float320.05.0
MotCurrAdcVlyB_Volt_T_f32float320.05.0
MotCurrAdcVlyC_Volt_T_f32float320.05.0
MotVelMrf_MotRadPerSec_T_f32float32-1350.01350.0
MotCurrOffsZeroAvrgA_Volt_T_f32float320.05.0
MotCurrOffsZeroAvrgB_Volt_T_f32float320.05.0
MotCurrOffsZeroAvrgC_Volt_T_f32float320.05.0
VehSpd_Kph_T_f32float320.0511.0
VehSpdVld_Cnt_T_loglbooleanFALSETRUE
DiagcStsIvtr1Inactv_Cnt_T_loglbooleanFALSETRUE
MotCurrEolCalStPrev_Cnt_T_enumMotCurrEolCalSt208
Return ValueN/A---

Design Rationale

Refer FDD

Processing

Refer FDD

RangeChkWIABC

Function NameRangeChkWIABCTypeMinMax
Arguments PassedMotCurrAdcVlyA_Volt_T_f32float320.05.0
MotCurrAdcVlyB_Volt_T_f32float320.05.0
MotCurrAdcVlyC_Volt_T_f32float320.05.0
Return ValueInRng_Cnt_T_loglbooleanFALSETRUE

Design Rationale

Refer FDD

Processing

Refer FDD

ProtocolChkENABC

Function NameProtocolChkENABCTypeMinMax
Arguments PassedN/A---
Return ValueProtocolChkEn_Cnt_T_loglbooleanFALSETRUE

Design Rationale

Refer FDD

Processing

Refer FDD

CalcMotCurrMotAgCorrd

Function NameCalcMotCurrMotAgCorrdTypeMinMax
Arguments PassedN/A---
Return ValueMotCtrlCurrMeasMotAgCorrd_Rad_T_f32float32-0.76666.2832

Design Rationale

Refer FDD

Processing

Refer FDD

CalMotCurrCorrdABC

Function NameCalMotCurrCorrdABCTypeMinMax
Arguments PassedMotCurrOffsA_Volt_T_f32float32-1892868,51892873,5
MotCurrOffsA_Volt_T_f32float32-1892868,51892873,5
MotCurrOffsA_Volt_T_f32float32-1892868,51892873,5
Return ValueN/A

Design Rationale

Refer FDD

Processing

Refer FDD

OffsCalcABC

Function NameOffsCalcABCTypeMinMax
Arguments PassedN/A
Return ValueMotCurrOffsA_Volt_T_f32float32-1892868,51892873,5
MotCurrOffsB_Volt_T_f32float32-1892868,51892873,5
MotCurrOffsC_Volt_T_f32float32-1892868,51892873,5

Design Rationale

Refer FDD

Processing

Refer FDD

GainCmdAD

Function NameGainCmdADTypeMinMax
Arguments PassedMotCurrAdcVlyA_Volt_T_f32float320.05.0
MotCurrOffsZeroAvrgA_Volt_T_f32float320.05.0
Return ValueN/A

Design Rationale

This function is created for reducing the complexity of GainCalibration function

Processing

Refer the source file

GainCmdBE

Function NameGainCmdBETypeMinMax
Arguments PassedMotCurrAdcVlyB_Volt_T_f32float320.05.0
MotCurrOffsZeroAvrgB_Volt_T_f32float320.05.0
Return ValueN/A

Design Rationale

This function is created for reducing the complexity of GainCalibration function

Processing

Refer the source file

GainCmdCF

Function NameGainCmdCFTypeMinMax
Arguments PassedMotCurrAdcVlyC_Volt_T_f32float320.05.0
MotCurrOffsZeroAvrgC_Volt_T_f32float320.05.0
Return ValueN/A

Design Rationale

This function is created for reducing the complexity of GainCalibration function

5.4.10.2 Processing

Refer the source file

CmdSafest

Function NameCmdSafestTypeMinMax
Arguments PassedDiagcStsIvtr1Inactv_Cnt_T_loglbooleanFALSETRUE
Return ValueN/A

Design Rationale

This function is created for reducing the complexity of GainCalibration function

5.4.11.2 Processing

Refer the source file

OffsCmdHI

Function NameOffsCmdHITypeMinMax
Arguments PassedMotCurrAdcVlyA_Volt_T_f32float320.05.0
MotCurrAdcVlyB_Volt_T_f32float320.05.0
MotCurrAdcVlyC_Volt_T_f32float320.05.0
BrdgVltg_Volt_T_f32float326.026.5
Return ValueN/A

Design Rationale

This function is created for reducing the complexity of OffsetCalibration function

5.4.12.2 Processing

Refer the source file

OffsCmdLO

Function NameOffsCmdLOTypeMinMax
Arguments PassedMotCurrAdcVlyA_Volt_T_f32float320.05.0
MotCurrAdcVlyB_Volt_T_f32float320.05.0
MotCurrAdcVlyC_Volt_T_f32float320.05.0
Return ValueN/A

Design Rationale

This function is created for reducing the complexity of OffsetCalibration function

5.4.13.2 Processing

Refer the source file

OffsCmdZERO

Function NameOffsCmdZEROTypeMinMax
Arguments PassedMotCurrAdcVlyA_Volt_T_f32float320.05.0
MotCurrAdcVlyB_Volt_T_f32float320.05.0
MotCurrAdcVlyC_Volt_T_f32float320.05.0
Return ValueN/A

Design Rationale

This function is created for reducing the complexity of OffsetCalibration function

5.4.14.2 Processing

Refer the source file

OffsCmdEND

Function NameOffsCmdENDTypeMinMax
Arguments PassedDiagcStsIvtr1Inactv_Cnt_T_loglbooleanFALSETRUE
Return ValueN/A

Design Rationale

This function is created for reducing the complexity of OffsetCalibration function

5.4.15.2 Processing

Refer the source file

GLOBAL Function/Macro Definitions

None

Known Limitations with Design

None

UNIT TEST CONSIDERATION

None

Abbreviations and Acronyms

Abbreviation or AcronymDescription
--

Glossary

Note: Terms and definitions from the source “Nexteer Automotive” take precedence over all other definitions of the same term. Terms and definitions from the source “Nexteer Automotive” are formulated from multiple sources, including the following:

  • ISO 9000

  • ISO/IEC 12207

  • ISO/IEC 15504

  • Automotive SPICE® Process Reference Model (PRM)

  • Automotive SPICE® Process Assessment Model (PAM)

  • ISO/IEC 15288

  • ISO 26262

  • IEEE Standards

  • SWEBOK

  • PMBOK

  • Existing Nexteer Automotive documentation

TermDefinitionSource
MDDModule Design Document
DFDData Flow Diagram

References

Ref. #TitleVersion
1AUTOSAR Specification of Memory Mapping (Link:AUTOSAR_SWS_MemoryMapping.pdf)v1.3.0 R4.0 Rev 2
2MDD GuidelineEA4 01.00.01
3Software Naming Conventions01.01.00
4Software Design and Coding Standards2.1
5ES200B_CurrMeas_DesignSee Synergy Sub Project Version
Last modified October 12, 2025: Initial commit (af72ad2)