ExcpnHndlg Module Design Document

Module Design Document

For

ExcpnHndlg

April 5, 2016

Prepared For:

Software Engineering

Nexteer Automotive,

Saginaw, MI, USA

Prepared By:

Software Group,

Nexteer Automotive,

Saginaw, MI, USA
Change History

DescriptionAuthorVersionDate
Initial VersionAvinash James1.005-Apr-2016


Table of Contents

1 Introduction 7

1.1 Purpose 7

1.2 Scope 7

2 ExcpnHndlg & High-Level Description 8

3 Design details of software module 9

3.1 Graphical representation of ExcpnHndlg 9

3.2 Data Flow Diagram 9

3.2.1 Component level DFD 9

3.2.2 Function level DFD 9

4 Constant Data Dictionary 10

4.1 Program (fixed) Constants 10

4.1.1 Embedded Constants 10

5 Software Component Implementation 13

5.1 Sub-Module Functions 13

5.1.1 Init: ExcpnHndlgInit1 13

5.1.1.1 Design Rationale 13

5.1.1.2 Module Outputs 13

5.1.2 Init: ExcpnHndlgInit2 13

5.1.2.1 Design Rationale 13

5.1.2.2 Module Outputs 13

5.1.3 Per: ExcpnHndlgPer1 13

5.1.3.1 Design Rationale 13

5.1.3.2 Store Module Inputs to Local copies 13

5.1.3.3 (Processing of function)……… 13

5.1.3.4 Store Local copy of outputs into Module Outputs 13

5.2 Server Runables 13

5.2.1 ChkForStrtUpTest 13

5.2.1.1 Design Rationale 13

5.2.1.2 (Processing of function)……… 13

5.2.2 FeNmiClkMonr0RtLowrLimFlt 14

5.2.2.1 Design Rationale 14

5.2.2.2 (Processing of function)……… 14

5.2.3 FeNmiClkMonr0RtUpprLimFlt 14

5.2.3.1 Design Rationale 14

5.2.3.2 (Processing of function)……… 14

5.2.4 FeNmiClkMonr1RtLowrLimFlt 14

5.2.4.1 Design Rationale 14

5.2.4.2 (Processing of function)……… 14

5.2.5 FeNmiClkMonr1RtUpprLimFlt 14

5.2.5.1 Design Rationale 14

5.2.5.2 (Processing of function)……… 14

5.2.6 FeNmiClkMonr2RtLowrLimFlt 14

5.2.6.1 Design Rationale 14

5.2.6.2 (Processing of function)……… 14

5.2.7 FeNmiClkMonr2RtUpprLimFlt 14

5.2.7.1 Design Rationale 14

5.2.7.2 (Processing of function)……… 15

5.2.8 FeNmiClkMonr3RtLowrLimFlt 15

5.2.8.1 Design Rationale 15

5.2.8.2 (Processing of function)……… 15

5.2.9 FeNmiClkMonr3RtUpprLimFlt 15

5.2.9.1 Design Rationale 15

5.2.9.2 (Processing of function)……… 15

5.2.10 FeNmiDmaTrf 15

5.2.10.1 Design Rationale 15

5.2.10.2 (Processing of function)……… 15

5.2.11 FeNmiDmaRegAcsProtnErr 15

5.2.11.1 Design Rationale 15

5.2.11.2 (Processing of function)……… 15

5.2.12 FeNmiEcmMstChkrCmp 15

5.2.12.1 Design Rationale 15

5.2.12.2 (Processing of function)……… 15

5.2.13 FeNmiOperModErrFlsProgmModStrtd 16

5.2.13.1 Design Rationale 16

5.2.13.2 (Processing of function)……… 16

5.2.14 FeNmiOperModErrSngChipInactv 16

5.2.14.1 Design Rationale 16

5.2.14.2 (Processing of function)……… 16

5.2.15 FeNmiOperModErrTestModStrtd 16

5.2.15.1 Design Rationale 16

5.2.15.2 (Processing of function)……… 16

5.2.16 FeNmiPeg 16

5.2.16.1 Design Rationale 16

5.2.16.2 (Processing of function)……… 16

5.2.17 FeNmiWdg 16

5.2.17.1 Design Rationale 16

5.2.17.2 (Processing of function)……… 16

5.2.18 GetMcuDiagcIdnData 17

5.2.18.1 Design Rationale 17

5.2.18.2 (Processing of function)……… 17

5.2.19 ProcMpuExcpnErr 17

5.2.19.1 Design Rationale 17

5.2.19.2 (Processing of function)……… 17

5.2.20 ProcNonCritOsErr 17

5.2.20.1 Design Rationale 17

5.2.20.2 (Processing of function)……… 17

5.2.21 ProcPrmntOsErr 17

5.2.21.1 Design Rationale 17

5.2.21.2 (Processing of function)……… 17

5.2.22 ProcPrvlgdInstrExcpnErr 17

5.2.22.1 Design Rationale 17

5.2.22.2 (Processing of function)……… 17

5.2.23 ProcUkwnExcpnErr 18

5.2.23.1 Design Rationale 18

5.2.23.2 (Processing of function)……… 18

5.2.24 SetMcuDiagcIdnData 18

5.2.24.1 Design Rationale 18

5.2.24.2 (Processing of function)……… 18

5.3 Interrupt Functions 18

5.3.1 AlgnErrIrq 18

5.3.1.1 Design Rationale 18

5.3.1.2 (Processing of the ISR function)….. 18

5.3.2 FpuErrIrq 18

5.3.2.1 Design Rationale 18

5.3.2.2 (Processing of the ISR function)….. 18

5.3.3 SysErrIrq 18

5.3.3.1 Design Rationale 18

5.3.3.2 (Processing of the ISR function)….. 18

5.3.4 ResdOperIrq 19

5.3.4.1 Design Rationale 19

5.3.4.2 (Processing of the ISR function)….. 19

5.4 Module Internal (Local) Functions 19

5.4.1 ProcStrtUpOrSwRst 19

5.4.1.1 Design Rationale 19

5.4.1.2 Processing 19

5.4.2 ProcEcmRst 19

5.4.2.1 Design Rationale 19

5.4.2.2 Processing 19

5.4.3 ProcPinRst 19

5.4.3.1 Design Rationale 20

5.4.3.2 Processing 20

5.5 GLOBAL Function/Macro Definitions 20

5.5.1 GLOBAL Function #1 20

5.5.1.1 Design Rationale 20

5.5.1.2 processing 20

6 Known Limitations with Design 21

7 UNIT TEST CONSIDERATION 22

Appendix A Abbreviations and Acronyms 23

Appendix B Glossary 24

Appendix C References 25

Introduction

Purpose

This document details the design in the FDD and also lists out any deviations which were made from the design for the implementation due to any constraints in development. ExcpnHndlg MDD describes the exception handling / reset cause determination for microcontroller diagnostics

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.

ExcpnHndlg & High-Level Description

Refer FDD

Design details of software module

Graphical representation of ExcpnHndlg

Data Flow Diagram

Component level DFD

N/A

Function level DFD

N/A

Constant Data Dictionary

Program (fixed) Constants

Embedded Constants

Local Constants

Constant NameResolutionUnitsValue
FPCFGININVAL_CNT_T_U321Counts0x0000001CU
FPCFGREGID_CNT_S321Counts10
FPCFGSELNID_CNT_S321Counts0
FPUINVLDOPERSTSBIT_CNT_U321Counts((uint32)(0x00004000U))
FPUDIVBYZEROSTSBIT_CNT_U321Counts((uint32)(0x00002000U))
FPUOVFSTSBIT_CNT_U321Counts((uint32)(0x00001000U))
MEMERRINFOREADWRBIT_CNT_U321Counts((uint32)(0x00000001U))
CF1STERSTRADRPARMASK_CNT_U321Counts((uint32)(0x00000004U))
CF1STERSTRDBLBITMASK_CNT_U321Counts((uint32)(0x00000002U))
CF1STERSTRSNGBITMASK_CNT_U321Counts((uint32)(0x00000001U))
PRPHLBUSDATAPARMASK_CNT_U321Counts((uint32)(0x10000000U))
DTSDBLBITMASK_CNT_U321Counts((uint32)(0x80000000U))
CODFLSSNGBITHARDFLT_CNT_U081Counts1U
CODFLSECCDBLBIT_CNT_U081Counts2U
CODFLSADRPAR_CNT_U081Counts4U
MEMBISTSTRTUPTESTFAILR_CNT_U081Counts1U
LCLRAMECCSNGBITHARDFLT_CNT_U081Counts1U
LCLRAMECCDBLBIT_CNT_U081Counts2U
INVLDRAMAREA_CNT_U081Counts4U
DTSDBLBIT_CNT_U081Counts2U
SPI0PRPHLRAMDBLBIT_CNT_U081Counts2U
SPI1PRPHLRAMDBLBIT_CNT_U081Counts2U
SPI2PRPHLRAMDBLBIT_CNT_U081Counts2U
SPI3PRPHLRAMDBLBIT_CNT_U081Counts2U
BISTCODECCFAILR_CNT_U081Counts1U
LOGLBISTSTRTUPTESTFAILR_CNT_U081Counts4U
BISTNOTCMPL_CNT_U081Counts16U
CPULOCKSTEPSTRTUPTESTFAILR_CNT_U081Counts32U
LOCKSTEPCOMP_CNT_U081Counts1U
SYSVCIE_CNT_U081Counts2U
RESDOPER_CNT_U081Counts4U
ALGNREAD_CNT_U081Counts8U
ALGNWR_CNT_U081Counts16U
INSTRFETCH_CNT_U081Counts32U
CLKMONR0RTLOWRLIMFLT_CNT_U081Counts4U
CLKMONR0RTUPPRLIMFLT_CNT_U081Counts8U
CLKMONR2RTLOWRLIMFLT_CNT_U081Counts64U
CLKMONR2RTUPPRLIMFLT_CNT_U081Counts128U
OPERMODERRFLSPROGMMODSTRTD_CNT_U081Counts1U
OPERMODERRTESTMODSTRTD_CNT_U081Counts2U
OPERMODERRSNGCHIPINACTV_CNT_U081Counts4U
CLKMONR1RTLOWRLIMFLT_CNT_U081Counts4U
CLKMONR1RTUPPRLIMFLT_CNT_U081Counts8U
CLKMONR3RTLOWRLIMFLT_CNT_U081Counts64U
CLKMONR3RTUPPRLIMFLT_CNT_U081Counts128U
DATAPROTNERR_CNT_U081Counts1U
INSTRPROTNERR_CNT_U081Counts2U
ECMSTSFLT_CNT_U081Counts1U
ECMMSTSTRTUPTESTFAILR_CNT_U081Counts4U
ECMCHKRSTRTUPTESTFAILR_CNT_U081Counts8U
ECMRTMSTCHKRCOMPFLT_CNT_U081Counts128U
FPUINVLDOPEREXCPN_CNT_U081Counts2U
FPUDIVBYZEROEXCPN_CNT_U081Counts4U
FPUOVFEXCPN_CNT_U081Counts8U
FPUUKWNEXCPN_CNT_U081Counts16U
UKWNRST_CNT_U081Counts1U
UKWNECMRST_CNT_U081Counts2U
UKWNSWRST_CNT_U081Counts16U
BACKUPRAMTSTFAILR_CNT_U081Counts32U
FLSBTLDRPREOSSRTUPEXCPN_CNT_U081Counts64U
STRTUPRSTINFOFAILD_CNT_U081Counts128U
PROGFLOW_CNT_U081Counts1U
DEADLINEMONR_CNT_U081Counts2U
ALVMONR_CNT_U081Counts4U
WDGTOUT_CNT_U081Counts1U
PEGRTFLT_CNT_U081Counts2U
IPGRTFLT_CNT_U081Counts8U
PBGSTRTUPTSTAILR_CNT_U081Counts16U
PBGRTFLT_CNT_U081Counts32U
DBGRST_CNT_U081Counts1U
OSCRITFLT_CNT_U081Counts1U
UKWNEXCPN_CNT_U081Counts2U
OSNONCRITFLT_CNT_U081Counts1U
DMATRFERR_CNT_U081Counts1U
DMAREGACSPROTCNERR_CNT_U081Counts2U
PRPHLBUSDATAPARSTRTUPFLT_CNT_U081Counts64U
PRPHLBUSDATAPARPRTFLT_CNT_U081Counts128U
CVMOVERVLTGSTRTUPTESTFAILR_CNT_U081Counts1U
CVMUNDERVLTGSTRTUPTESTFAILR_CNT_U081Counts2U
INTCVMOVERVLTGMONR_CNT_U081Counts1U
INTCVMUNDERVLTGMONR_CNT_U081Counts2U
INTMONRLOVCCFLT_CNT_U081Counts16U
EXTVLTGMONRFLT_CNT_U081Counts128U
UPPR16BITMASK_CNT_U321Counts((uint32)(0xFFFF0000U))
LOWR16BITMASK_CNT_U321Counts((uint32)(0x0000FFFFU))

Software Component Implementation

Sub-Module Functions

Init: ExcpnHndlgInit1

Design Rationale

Non-RTE function because it needs to be called before the OS is started - so that floating point exceptions can be enabled before anything uses floating point

Module Outputs

None

Init: ExcpnHndlgInit2

Design Rationale

RTE function to initialize all the NTCs to pass

Module Outputs

None

Per: ExcpnHndlgPer1

Design Rationale

RTE Periodic function called every 2 ms to check for OS errors

Store Module Inputs to Local copies

Refer MDD

(Processing of function)………

Triggered on Timing Event every 2ms

Store Local copy of outputs into Module Outputs

None

Server Runables

ChkForStrtUpTest

Design Rationale

Refer FDD

(Processing of function)………

Refer FDD

FeNmiClkMonr0RtLowrLimFlt

Design Rationale

Refer FDD

(Processing of function)………

Refer FDD

FeNmiClkMonr0RtUpprLimFlt

Design Rationale

Refer FDD

(Processing of function)………

Refer FDD

FeNmiClkMonr1RtLowrLimFlt

Design Rationale

Refer FDD

(Processing of function)………

Refer FDD

FeNmiClkMonr1RtUpprLimFlt

Design Rationale

Refer FDD

(Processing of function)………

Refer FDD

FeNmiClkMonr2RtLowrLimFlt

Design Rationale

Refer FDD

(Processing of function)………

Refer FDD

FeNmiClkMonr2RtUpprLimFlt

Design Rationale

Refer FDD

(Processing of function)………

Refer FDD

FeNmiClkMonr3RtLowrLimFlt

Design Rationale

Refer FDD

(Processing of function)………

Refer FDD

FeNmiClkMonr3RtUpprLimFlt

Design Rationale

Refer FDD

(Processing of function)………

Refer FDD

FeNmiDmaTrf

Design Rationale

Refer FDD

(Processing of function)………

Refer FDD

FeNmiDmaRegAcsProtnErr

Design Rationale

Refer FDD

(Processing of function)………

Refer FDD

FeNmiEcmMstChkrCmp

Design Rationale

Refer FDD

(Processing of function)………

Refer FDD

FeNmiOperModErrFlsProgmModStrtd

Design Rationale

Refer FDD

(Processing of function)………

Refer FDD

FeNmiOperModErrSngChipInactv

Design Rationale

Refer FDD

(Processing of function)………

Refer FDD

FeNmiOperModErrTestModStrtd

Design Rationale

Refer FDD

(Processing of function)………

Refer FDD

FeNmiPeg

Design Rationale

Refer FDD

(Processing of function)………

Refer FDD

FeNmiWdg

Design Rationale

Refer FDD

(Processing of function)………

Refer FDD

GetMcuDiagcIdnData

Design Rationale

Refer FDD

(Processing of function)………

Refer FDD

ProcMpuExcpnErr

Design Rationale

Refer FDD

(Processing of function)………

Refer FDD

ProcNonCritOsErr

Design Rationale

Refer FDD

(Processing of function)………

Refer FDD

ProcPrmntOsErr

Design Rationale

Refer FDD

(Processing of function)………

Refer FDD

ProcPrvlgdInstrExcpnErr

Design Rationale

Refer FDD

(Processing of function)………

Refer FDD

ProcUkwnExcpnErr

Design Rationale

Refer FDD

(Processing of function)………

Refer FDD

SetMcuDiagcIdnData

Design Rationale

Refer FDD

(Processing of function)………

Refer FDD

Interrupt Functions

AlgnErrIrq

Design Rationale

Refer FDD

(Processing of the ISR function)…..

Refer FDD

FpuErrIrq

Design Rationale

Refer FDD

(Processing of the ISR function)…..

Refer FDD

SysErrIrq

Design Rationale

Refer FDD

(Processing of the ISR function)…..

Refer FDD

ResdOperIrq

Design Rationale

Refer FDD

(Processing of the ISR function)…..

Refer FDD

Module Internal (Local) Functions

ProcStrtUpOrSwRst

Function NameProcStrtUpOrSwRstTypeMinMax
Arguments PassedNone
Return ValueNA

Design Rationale

Refer FDD

Processing

ProcEcmRst

Function NameProcEcmRstTypeMinMax
Arguments PassedNone
Return ValueNA

Design Rationale

Refer FDD

Processing

ProcPinRst

Function NameProcPinRstTypeMinMax
Arguments PassedNone
Return ValueNA

Design Rationale

Refer FDD

Processing

GLOBAL Function/Macro Definitions

<If these are numerous and defined in a separate source file then reference the source file only.>

GLOBAL Function #1

Function Name(Exact name used)TypeMinMax
Arguments Passed(if none, write None)<Refer MDD guidelines[1]><Refer MDD guidelines[1]><Refer MDD guidelines[1]>
(Insert more rows for additional passed arguments)
Return Value(if no value returned, write N/A)

Design Rationale

processing

(Place flowchart/design for local function)

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 Conventions.doc1.0
4Software Design and Coding Standards.doc2.1
Last modified October 12, 2025: Initial commit (312cf32)