1 - CmMtrCurr Design Review


Overview

Summary Sheet
Source Code
Data Dictionary
QAC


Sheet 1: Summary Sheet
























Rev 3.011-Dec-13

Peer Review Summary Sheet



























Component Name:


kzshz2: Intended Use: Identify which component is being reviewed. This should be the Module Short Name from Synergy Rationale: Required for traceability. It will help to ensure this form is not attaced to the the wrong change request. CmMtrCurr
Component Revision:


kzshz2: Intended Use: Identify which Synergy revision of this component is being reviewed Rationale: Required for traceability. It will help to ensure this form is not attaced to the the wrong change request. FDD01C_07.0_NoUTP





























Change Owner:


kzshz2: Intended Use: Identify the developer who made the change(s) Rationale: A change request may have more than one resolver, this will help identify who made what change. Change owner identification may be required by indusrty standards. Lovepreet Kaur
Change Request ID:


CR# 10909 and 11063





























kzshz2: Intended Use: Intended to identify at a high level to the reviewers which areas of the component have been changed. Rationale: This will be good information to know when ensuring appropriate reviews have been completed. Modified File Types:
















































































































































kzshz2: Intended Use: Identify who where the reviewers, what they reviewed, and if the reviewed changes have been approved to release the code for testing. Comments here should be at a highlevel, the specific comments should be present on the specific review form sheet. Rationale: Since this Form will be attached to the Change Request it will confirm the approval and provides feedback in case of audits. ADD DR Level Move reviewer and approval to individual checklist form Review Checklist Summary:






















































Reviewed:































MDD


XSource Code



XData Dictionary


XQAC



































Integration Manual


Davinci Files








































































Comments:

Only Source Code and Data Dictonary have gone through initial phase of complete design review.






Changes have been made to them which need revision.MDD still needs to be looked at to finish complete design review task.






































































































General Guidelines:
- The reviews should be performed over the portions of the component that were modified as a result of the Change Request. (Note: If this peer review form was not
completed for pervious versions of this component, the Change Owner should review the entire component and complete the checklist in its entirety prior and check
the form into Syngery. This should be done prior to reviewing the modifications for this Change Result)
- The Change Owner is responsible for completing the entire checklist (Pre and Group review items) prior holding the initial group review.
- New components should include FDD Owner and Intergator as apart of the Group Review Board (Source Code, Integration Manual, and Davinci Files)
- Select "Yes" and add "N/A" to the comments for checklist items that are not applicable for this change















Sheet 2: Source Code






















Rev 3.011-Dec-13
Peer Review Meeting Log (Source Code Review)

























Source File Name:




kzshz2: Intended Use: Identify which .asm, .c, or .h file is being reviewed Rationale: Required for traceability. It will help to ensure this sheet is not attached to the wrong design review form. Sa_CmMtrCurr.c
Source File Revision:


kzshz2: Intended Use: Identify which version of the source file is being review. Rationale: Required for traceability between source code and review. Auditors will likely require this. 18

























Module Design Document Name:




kzshz2: Intended Use: Identify which version of the MDD this source file was written against. Rationale: Needed for traceability between source code and MDD CmMtrCurr_MDD
MDD Revision:


kzshz2: Intended Use: Identify which version of the MDD this source file was written against. Rationale: Needed for traceability between source code and MDD 7

































Data Dictionary Revision:



kzshz2: Intended Use: Identify which version of the Data Dictionary was referenced for ranges during the source file review. Rationale: Needed for traceability between source code and DD 7

































Quality Check Items:

































YesNo
Rationale is required for all answers of No









Pre-review checklist
(change owners only)
Analysis performed for divide by zero




kzshz2: Intended Use: To confirm this defensive coding strategy has been taken into consideration Rationale: Necessary since currently there is no place this is documented



X
Comments:










































Software Design and Coding Standard followed
X
Comments:

Checked through QAC













































Software Naming Convention followed


X

Comments:
Changed variable names to address naming convention.




















For example, removed 's' in the unit identifier, added 'CmMtrCurr_' in front of the Display and modular level variables.

































All buffered outputs are written in every path








X
Comments:

















































Group-review Checklist (review board)Telelogic Synergy version matches header





kzshz2: Intended Use: Indicate that the the versioning was confirmed by the peer reviewer(s). Rationale: There have been many occassions where versions were not updated in files and as a result Unit Test were referencing wrong versions. This often time leads to the need to re-run of batch tests.


X
Comments:

NA







































Change log contains detailed description of changes








X
Comments:

NA







































Code compared vs requirements (Document or Model)







kzshz2: Intended Use: Identify if previous version was compared and only the expected change(s) was present. Rationale: This is helpful in identifying unapproved (intended or mistaken) changes.
X
Comments:

Information sent to FDD owner for clarifications in doc













































Global Outputs (RTE/Non-RTE) Initialized








X
Comments:
















































Global Outputs are limited to the legal range defined








X
Comments:

MtrCurrFinalQax_Amps_T_f32 output doesn't match FDD DD (D_CURRDQMAX_AMP_F32 is set to 220)







in the FDD Data dictionary










Added D_MINVCALCMD_CNT_F32 = 17500 constant to address A6080

































No Compiler Errors verified


kzshz2: Intended Use: To confirm the appropriate variable name formats have been used. Rationale: This is needed to ensure there will be no errors discovered at the time of integration. A Sandox project may be required to confirm there are no errors until the QAC tool has been evaultated to determine if it can automate this check.





X
Comments:
















































Type Casting and Fix Point Macros use reviewed








X
Comments:

QAC check













































Function prototype and passed parameters are








X
Comments:










consistent






































General Notes / Comments:

















































































kzshz2: Intended Use: Identify who where the reviewers and if the reviewed changes have been approved. Rationale: Since this Form will be attached to the Change Request it will confirm the approval and provides feedback in case of audits. Group Review Level: There are four Design Review States that a document may have as follows: DR1 – Un-reviewed document. The DR1 reviews usually require larger, cross functional review teams (i.e. Management, Hardware Engineering, etc.) It is usually advisable, but not required to include outside representation as well such as system engineers. It is up to the document owner to decide on the scope of the review, however, the peer group can decide that a re-review with additional team member is required. DR2 – The Document has previously passed through the peer review process, but requires design changes significant enough to require another group peer review. DR3 – The Document has passed group peer review but needs minor corrections that can be re-reviewed with the Lead Peer Reviewer. DR4 – The document has passed all peer reviews and is ready for release. Review Board:


























Change Owner:

Lovepreet Kaur
Review Date :

01/31/14
Group Review Level:


DR4



























Lead Peer Reviewer:


Selva Sengottaiyan

Approved by Reviewer(s):



Yes































Other Reviewer(s):










































































Sheet 3: Data Dictionary






















Rev 3.011-Dec-13
Peer Review Meeting Log (Data Dictionary Review)


























Data Dictionary Revision:



kzshz2: Intended Use: Identify which version of the file is being reviewed Rationale: Required for traceability. 7









































kzshz2: Intended Use: Indicate to the reviewers the type of variable changes. This should be filled out prior to the review by the change owner. Rationale: This will be good information to know to both reviewers and post reviewers of the change. Variables:



























XNewly Added


XName Changes


XRange Changes


XDeleted
































XNVM Changes


Other:


































































kzshz2: Intended Use: Indicate to the reviewers the type of calibration changes. This should be filled out prior to the review by the change owner. Rationale: This will be good information to know to both reviewers and post reviewers of the change. Calibrations:



























XNewly Added


Name Changes


Range Changes


Default Value Changes
































Deleted


Other:


































































Quality Check Items:

































YesNo
Rationale is required for all answers of No









Group-review Checklist (review board)Telelogic Synergy version matches header








X
Comments:










































Change log contains detailed description of changes








X
Comments:










































All Changes Identified (for Unit Tester)








X
Comments:

List attached







































Calibration and NVM names, ranges, and default values








X
Comments:




compared against FDD




































Global variables names, ranges, and default values








X
Comments:




compared against FDD Data Dictionary






























































General Notes / Comments:























Sheet attached sheet with comments about some of the variables that need revision and/or modification in the data dictionary.


































kzshz2: Intended Use: Identify who where the reviewers and if the reviewed changes have been approved. Rationale: Since this Form will be attached to the Change Request it will confirm the approval and provides feedback in case of audits. Group Review Level: There are four Design Review States that a document may have as follows: DR1 – Un-reviewed document. The DR1 reviews usually require larger, cross functional review teams (i.e. Management, Hardware Engineering, etc.) It is usually advisable, but not required to include outside representation as well such as system engineers. It is up to the document owner to decide on the scope of the review, however, the peer group can decide that a re-review with additional team member is required. DR2 – The Document has previously passed through the peer review process, but requires design changes significant enough to require another group peer review. DR3 – The Document has passed group peer review but needs minor corrections that can be re-reviewed with the Lead Peer Reviewer. DR4 – The document has passed all peer reviews and is ready for release. Review Board:


























Change Owner:

Lovepreet Kaur
Review Date :

01/31/14
Group Review Level:


DR4



























Lead Peer Reviewer:


Selva Sengottaiyan

Approved by Reviewer(s):



Yes































Other Reviewer(s):











































































Sheet 4: QAC






















Rev 3.011-Dec-13
Peer Review Meeting Log (QAC Review)


























Module Name:

kzshz2: Intended Use: Identify which .c file is being analyzed Rationale: Required for traceability. It will help to ensure this sheet is not attached to the wrong design review form. CmMtrCurr

Source File Revision:


18

Module
1of1


























Compliance Document Version:




QAC_6









































kzshz2: Intended Use: Identify specific changes in results (new violation present, previous violation corrected, etc.). Changes to the version of the tool or the way the results were gathered should be described here also. This should be filled out prior to the review by the change owner. Rationale: Gives reviewers an what needs to be focused on. Forces the change owner to compare with previous results to catch any differences that may otherwise go unoticed Brief Summary of Changes (In Results or Tool):


































































Quality Check Items:

































YesNo
Rationale is required for all answers of No









Pre-review
checklist for change owners
QAC version is correct and did not change (List version)







kzshz2: Intended Use: Identify which version of the QAC Subproject was used and if any of the personalities may have changed. Rationale: Will help ensure this is factored into evaluating the results
X
Comments:

QAC_6







































Contract Folder's header files are appropriate





kzshz2: Intended Use: Identify that the contract folder contains only the information required for this component. All other variables, constants, function prototypes, etc. should be removed. Rationale: This will help avoid unit testers having to considers object not used. It will also avoid having other files required for QAC.


X
Comments:












































G Group-review Checklist (review board)100% Compliance to the MISRA Compliance DocumentX
Comments:

No new warnings came










































General Notes / Comments:



























































kzshz2: Intended Use: Identify who where the reviewers and if the reviewed changes have been approved. Rationale: Since this Form will be attached to the Change Request it will confirm the approval and provides feedback in case of audits. Group Review Level: There are four Design Review States that a document may have as follows: DR1 – Un-reviewed document. The DR1 reviews usually require larger, cross functional review teams (i.e. Management, Hardware Engineering, etc.) It is usually advisable, but not required to include outside representation as well such as system engineers. It is up to the document owner to decide on the scope of the review, however, the peer group can decide that a re-review with additional team member is required. DR2 – The Document has previously passed through the peer review process, but requires design changes significant enough to require another group peer review. DR3 – The Document has passed group peer review but needs minor corrections that can be re-reviewed with the Lead Peer Reviewer. DR4 – The document has passed all peer reviews and is ready for release. Review Board:


























Change Owner:

Lovepreet Kaur
Review Date :

01/31/14
Group Review Level:


DR4



























Lead Peer Reviewer:


Selva Sengottaiyan

Approved by Reviewer(s):



Yes































Other Reviewer(s):









































































2 - CmMtrCurr_Integration_Manual

1 Dependencies 2

1.1 SWCs 2

1.2 Functions to be provided to Integration Project 2

2 Configuration 3

2.1 Build Time Config 3

2.2 Configuration Files to be provided by Integration Project 3

2.2.1 Da Vinci Config Configuration Changes 3

2.2.2 Manual Configuration Changes 3

3 Integration 5

3.1 Required Global Data Inputs 5

3.2 Specific Include Path present 5

4 Runnable Scheduling 6

5 Memory Mapping 7

5.1 Mapping 7

5.2 Usage 7

5.3 RTE NvM Blocks 7

5.4 Non RTE NvM Blocks 7

6 Compiler Settings 7

6.1 Preprocessor MACRO 7

6.2 Optimization Settings 7

7 Revision Control Log 8

Dependencies

SWCs

ModuleRequired Feature

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

Functions to be provided to Integration Project

CurrDQPer1

Configuration

Build Time Config

ModulesNotes
None

Configuration Files to be provided by Integration Project

CmMtrCurr_Cfg.h ( Refer CmMtrCurr_Cfg_Template.h in tools folder)

(Data synchronization must be provided at the integration level between 2 ms periodic and Motor Control ISR Periodic’s)

Outputs from the CmMtrCurr (Motor Control ISR) periodic must be synchronized with the outputs from

ES51 Signal correction outputs (Motor Control ISR) and buffered and mapped to 2 ms Task.

Da Vinci Config Configuration Changes

ConstantNotesSWC
MTRCURRPHASEBCPhaseB and Phase C used in Curr Measurement
MTRCURRPHASECBPhaseC and Phase B used in Curr Measurement
MTRCURRPHASEACPhaseA and Phase C used in Curr Measurement
MTRCURRPHASECAPhaseC and Phase A used in Curr Measurement
MTRCURRPHASEABPhaseA and Phase B used in Curr Measurement
MTRCURRPHASEBAPhaseB and Phase A used in Curr Measurement

Note: Only one of the configuration can be selected based on the requirements. Make sure order matches oreder in ADC data read ie MTRCURRPHASEBC - “BC” represents current_1 is phase B and current_2 is phase C .

Manual Configuration Changes

ConstantNotesSWC
none

Integration

Required Global Data Inputs

Specific Include Path present

Yes

Runnable Scheduling

This section specifies the required runnable scheduling.

InitScheduling RequirementsTrigger
CmMtrCurr_InitNoneRTE
RunnableScheduling RequirementsTrigger
CmMtrCurr_Per2NoneRTE(2MilliS)
CmMtrCurr_Per1NoneRTE(100 MilliS)
CurrDQPer1After DigMSB Signal processingISR (50MicroS)

.

Memory Mapping

Mapping

Memory SectionContentsNotes
CMMTRCURR_START_SEC_VAR_CLEARED_16
CMMTRCURR_START_SEC_VAR_CLEARED_8
CMMTRCURR_START_SEC_VAR_CLEARED_BOOLEAN
CMMTRCURR_START_SEC_VAR_CLEARED_32
SA_CMMTRCURR_CODE
RTE_START_SEC_SA_CMMTRCURR_APPL_CODE

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

Usage

Table 1: ARM Cortex R4 Memory Usage

FeatureRAMROM

RTE NvM Blocks

Block Name
None

Note : Size of the NVM block if configured in developer

Non RTE NvM Blocks

Block Name
None

Note : Size of the NVM block if configured in developer

Compiler Settings

Preprocessor MACRO

None

Optimization Settings

None

Revision Control Log

Rev #Change DescriptionDateAuthor
1Initial version7-Sep- 13nzt9hv

3 - CmMtrCurr_MDD

Module -- CmMtrCurr

High-Level Description

The Current Measurement function is responsible for measuring the motor phase currents used as feedback by the Motor Control FDD. Two motor phase currents are measured using a shunt resistor and a differential amplifier circuitry, and along with the motor position are transformed into direct (D) and quadrature (Q) axes currents using the combined Clarke/Park transform

UNIT Test Notes:

Unit test should be done with enabling one of the six predefned macro MTRCURRPHASEBC, MTRCURRPHASECB, MTRCRRPHASECA, MTRCURRPHASEAB, MTRCURRPHASEAC, MTRCURRPHASEBA. Hence it should have six UTP results (one for each Macro enabled).

Figures

Component diagram


Variable Data Dictionary

For details on module input / output variable, refer to the Data Dictionary for the application. Input / output variable names are listed here for reference.

Module InputsModule Outputs
FiltCntrlTemp_DegC_f32MtrCurr1TempOffset_Volt_f32
MtrCurrAngle_Rev_f32MtrCurr2TempOffset_Volt_f32
ComOffset_Cnt_u16
CorrMtrPosElec_Rev_f32CDD_ElecPosDelayComp_Rad_G_f32
MtrCurrK1_Amp_f32CDD_MtrElecPol_Cnt_G_s8
MtrCurrK2_Amp_f32CDD_MtrCurrQax_Amp_G_f32[]
ADCMtrCurr1_Volts_f32CDD_MtrCurrDax_Amp_G_f32[]
ADCMtrCurr2_Volts_f32CDD_CorrMtrPosElec_Rev_G_f32[]
Vecu_Volt_f32CDD_MtrCurrK1_Amps_G_f32[]
MtrVel_MtrRadpS_f32CDD_MtrCurrK2_Amps_G_f32[]
VehSpd_Kph_f32CDD_MtrCurr1_Volts_G_f32[]
VhSpdValid_Cnt_lgcCDD_MtrCurr2_Volts_G_f32[]
SrlComSvcDft_Cnt_b32CorrMtrCurrPosition_Rev_f32
MEC_Cnt_enumCurrentGainSvc_Cnt_lgc
CDD_MRFMtrVel_MtrRadpS_G_f32[]
CDD_Vecu_Volt_G_f32[]
DCPhsBComp_Cnt _u16
DCPhsCComp_Cnt_u16
DCPhsCComp_Cnt_G_u16
CDD_MtrCurr1TempOffset_Volt_G_f32[]
CDD_MtrCurr2TempOffset_Volt_G_f32[]
CDD_MtrPosElec_Rev_G_u0p16[]
CDD_CDDDataAccessBfr_Cnt_G_u16
CDD_AppDataFwdPthAccessBfr_Cnt_G_u16
CorrMtrCurrPosition_Rev_f32

Module Internal Variables

This section identifies the name, range and resolutions for module specific data created by this module. If there are no range restrictions on the variable, the term “FULL” is placed into the table for legal range.

Variable NameResolution

Legal Range

(min)

Legal Range

(max)

Software Segment
MtrCurr1OffDelta_VoltpVoltCnts_M_f32Single precision float0.0000125750CMMTRCURR_START_SEC_VAR_CLEARED_32
MtrCurr2OffDelta_VoltpVoltCnts_M_f32single precision float0.0000125750CMMTRCURR_START_SEC_VAR_CLEARED_32
MtrCurr1LpFltrSV_Volts_M_u3p292^-2905CMMTRCURR_START_SEC_VAR_CLEARED_32
MtrCurr2LpFltrSV_Volts_M_u3p292^-2905CMMTRCURR_START_SEC_VAR_CLEARED_32
FiltMtrCurr1_Volts_M_f32single precision float05CMMTRCURR_START_SEC_VAR_CLEARED_32
FiltMtrCurr2_Volts_M_f32single precision float05CMMTRCURR_START_SEC_VAR_CLEARED_32
CurrCorrDiagKSV_M_strN/AN/AN/ACMMTRCURR_START_SEC_VAR_CLEARED_UNSPECIFIED
CurrCorrDiagKSV_M_str.SV_Uls_f32single precision floatSee data dictionarySee data dictionaryCMMTRCURR_START_SEC_VAR_CLEARED_UNSPECIFIED
CurrCorrDiagKSV_M_str.K_Uls_f32single precision floatSee data dictionarySee data dictionaryCMMTRCURR_START_SEC_VAR_CLEARED_UNSPECIFIED
CurroffProcessFlag_M_enumsingle precision floatn/an/aCMMTRCURR_START_SEC_VAR_CLEARED_ UNSPECIFIED
CurrOffTrimFlag_M_lgcBOOLEANTrueFalseCMMTRCURR_START_SEC_VAR_CLEARED_BOOLEAN
CurrOffState_ULS_M_enumN/AN/AN/ACMMTRCURR_START_SEC_VAR_CLEARED_UNSPECIFIED
MtrCurr1SumHi_Volt_M_f32single precision float1.03.0CMMTRCURR_START_SEC_VAR_CLEARED_32
MtrCurr2SumHi_Volt_M_f32single precision float1.03.0CMMTRCURR_START_SEC_VAR_CLEARED_32
VecuSum_Volt_M_f32single precision float-2020CMMTRCURR_START_SEC_VAR_CLEARED_32
CurrOffAvgCounter_Cnt_M_u16102^16CMMTRCURR_START_SEC_VAR_CLEARED_16
MtrCurr1OffsetHi_Volts_M_f32single precision float1.03.0CMMTRCURR_START_SEC_VAR_CLEARED_32
MtrCurr2OffsetHi_Volts_M_f32single precision float1.03.0CMMTRCURR_START_SEC_VAR_CLEARED_32
MtrCurrValCmd_VoltCnts_M_f32single precision float080000CMMTRCURR_START_SEC_VAR_CLEARED_32
MtrCurr1SumLo_Volt_M_f32single precision float1.03.0CMMTRCURR_START_SEC_VAR_CLEARED_32
MtrCurr2SumLo_Volt_M_f32single precision float1.03.0CMMTRCURR_START_SEC_VAR_CLEARED_32
MtrCurr1OffsetLo_Volts_M_f32single precision float1.03.0CMMTRCURR_START_SEC_VAR_CLEARED_32
MtrCurr2OffsetLo_Volts_M_f32single precision float1.03.0CMMTRCURR_START_SEC_VAR_CLEARED_32
MtrCurr1SumZero_Volt_M_f32single precision float1.03.0CMMTRCURR_START_SEC_VAR_CLEARED_32
MtrCurr2SumZero_Volt_M_f32single precision float1.03.0CMMTRCURR_START_SEC_VAR_CLEARED_32
MtrCurr1OffsetZero_Volts_M_f32single precision float1.03.0CMMTRCURR_START_SEC_VAR_CLEARED_32
MtrCurr2OffsetZero_Volts_M_f32single precision float1.03.0CMMTRCURR_START_SEC_VAR_CLEARED_32
MtrCurr1offsetDiff_Volt_D_f32single precision float-0.0468750.046875CMMTRCURR_START_SEC_VAR_CLEARED_32
MtrCurr2offsetDiff_Volt_D_f32single precision float-0.0468750.046875CMMTRCURR_START_SEC_VAR_CLEARED_32
Duty1Cnts_Cnt_D_f32single precision float080000CMMTRCURR_START_SEC_VAR_CLEARED_32
Duty2Cnts_Cnt_D_f32single precision float080000CMMTRCURR_START_SEC_VAR_CLEARED_32
MtrCurr1Offset_Volt_D_f32single precision float-0.0468750.046875CMMTRCURR_START_SEC_VAR_CLEARED_32
MtrCurr2Offset_Volt_D_f32single precision float-0.0468750.046875CMMTRCURR_START_SEC_VAR_CLEARED_32
CorrMtrCurr1_Amps_D_f32single precision float-550550CMMTRCURR_START_SEC_VAR_CLEARED_32
CorrMtrCurr2_Amps_D_f32single precision float-550550CMMTRCURR_START_SEC_VAR_CLEARED_32
CorrMtrPosElec_Rev_D_f32single precision float01CMMTRCURR_START_SEC_VAR_CLEARED_32
MtrCurrK1_Amps_D_f32single precision float-550550CMMTRCURR_START_SEC_VAR_CLEARED_32
MtrCurrK2_Amps_D_f32single precision float-550550CMMTRCURR_START_SEC_VAR_CLEARED_32
CurrVectPosition_Rev_D_f32single precision float01CMMTRCURR_START_SEC_VAR_CLEARED_32
VectPosCosTheta_Uls_D_f32single precision float-11CMMTRCURR_START_SEC_VAR_CLEARED_32
VectPosSinTheta_Uls_D_f32single precision float-11CMMTRCURR_START_SEC_VAR_CLEARED_32
CurrCorrDiag_Amps_D_f32single precision float-550550CMMTRCURR_START_SEC_VAR_CLEARED_32
FiltCurrCorrDiag_Amps_D_f32single precision float-550550CMMTRCURR_START_SEC_VAR_CLEARED_32
CurrentGainSvc_Cnt_M_lgcBoolean01CMMTRCURR_START_SEC_VAR_CLEARED_BOOLEAN

User defined typedef definition/declaration

This section documents any user types uniquely used for the module.

Typedef NameElement NameUser Defined Type

Legal Range

(min)

Legal Range

(max)

CurrTempOffsetTypeCurrTempOffsetX_DegC_s10p5CurrTempOffsetTblType-50150
CurrOffsetY1_Volts_s4p11CurrTempOffsetTblType-0.0260.026
CurrOffsetY2_Volts_s4p11CurrTempOffsetTblType-0.0260.026
PhaseCurrCal_DataTypeEOLMtrCurrVcalCmd_VoltCnts_f32float080000
EOLPhscurr1Gain_AmpspVolt_f32float20125
EOLMtrCurr2OffsetDiff_Volts_f32float1.03.0
EOLMtrCurr1OffsetDiff_Volts_f32float1.03.0
EOLMtrCurr1OffsetLo_Volts_f32float1.03.0
EOLMtrCurr2OffsetLo_Volts_f32float1.03.0
EOLPhscurr2Gain_AmpspVolt_f32float20125
CurrTempOffsetTblType[16]Sint16FullFull

Constant Data Dictionary

Calibration Constants

This section lists the calibrations used by the module. For details on calibration constants, refer to the Data Dictionary for the application.

Constant Name
k_CurrOffGainKn_Cnt_u16
k_CurrCorrErrFiltFc_Hz_f32
k_MaxCurrOffMtrVel_RadpS_f32
k_MtrCurrEOLMaxOffset_Volts_f32
k_MtrCurrEOLMinOffset_Volts_f32
k_MtrCurrEOLMaxGain_AmpspVolts_f32
k_MtrCurrEOLMinGain_AmpspVolts_f32
k_MtrPosComputDelay_Sec_f32

Program(fixed) Constants

Embedded Constants

All embedded constants whose values are provided in Eng units will be evaluated to the equivalent counts by using the FPM_InitFixedPoint_m() macro within the #define statement.

Local

Constant NameResolutionUnitsValue
D_MTRCURROFFHICOMOFF_CNT_U161Counts4000
D_CURROFFNOOFAVG_CNT_U161Counts64
D_MTRCURROFFLOCOMOFF_CNT_U161Counts500
D_MTRCURROFFZEROCOMOFF_CNT_U161Counts0
D_REVWITHROUND_ULS_F32single precision floatUnitless65536.5
D_SCALERADTOCNTS_ULS_F32single precision floatUnitless10430.3783505
D_ROUND_ULS_F32single precision floatUnitless0.5
D_CNVRTP29TOP13_CNT_U161Counts16
D_POSITIVEONE_CNT_S81Counts1
D_ONEDIVSQRT3_F32single precision floatUnitless0.57735

Global

This section lists the global constants used by the module. For details on global constants, refer to the Data Dictionary for the application.

Constant Name
D_2PI_ULS_F32
D_FALSE_CNT_LGC
D_VECUMIN_VOLTS_F32
D_ZERO_ULS_F32
D_ZERO_CNT_U16
D_ZERO_CNT_U32
D_MTRPOLESDIV2_CNT_U8
D_2MS_SEC_F32

Module specific Lookup Tables Constants

(This is for lookup tables (arrays) with fixed values, same name as other tables)

Constant NameResolutionValueSoftware Segment
None


Functions/Macros used by the Sub-Modules

Library Functions / Macros

The library and functions / Macros that are called by the various sub modules are identified below,

  1. Cosf

  2. Sinf

  3. Limit_m

  4. Abs_f32_m

  5. TableSize_m

  6. FPM_FloatToFixed_m

  7. FPM_FixedToFloat_m

  8. IntplVarXY_s16_s16Xs16Y_Cnt

  9. LPF_SvUpdate_u16InFixKTrunc_m

  10. LPF_OpUpdate_u16InFixKTrunc_m

  11. LPF_SvUpdate_s16InFixKTrunc_m

  12. LPF_OpUpdate_s16InFixKTrunc_m

  13. LPF_KUpdate_f32_m

  14. LPF_OpUpdate_f32_m

Data Hiding Functions

  1. CmMtrCurr_Read_MRFMtrVel_MtrRadpS_f32

  2. CmMtrCurr_Read_Vecu_Volt_f32

  3. CmMtrCurr_Read_Phs1Curr_Cnt_u16

  4. CmMtrCurr_Read_Phs2Curr_Cnt_u16

  5. CmMtrCurr_Read_DCPhsAComp_Cnt_u16

  6. CmMtrCurr_Read_DCPhsBComp_Cnt_u16

  7. CmMtrCurr_Read_DCPhsCComp_Cnt_u16

  8. CmMtrCurr_Read_MtrCurr1TempOffset_Volt_f32

  9. CmMtrCurr_Read_MtrCurr2TempOffset_Volt_f32

  10. CmMtrCurr_Read_MtrElecPol_Cnt_s08

  11. CmMtrCurr_Read_MtrPosElec_Rev_u0p16

  12. CmMtrCurr_Write_ElecPosDelayComp_Rad_f32

  13. CmMtrCurr_Write_MtrCurrQax_Amp_f32

  14. CmMtrCurr_Write_MtrCurrDax_Amp_f32

  15. CmMtrCurr_Write_CorrMtrPosElec_Rev_f32

  16. CmMtrCurr_Write_MtrCurrK1_Amps_f32

  17. CmMtrCurr_Write_MtrCurrK2_Amps_f32

  18. CmMtrCurr_Write_MtrCurr1_Volts_f32

  19. CmMtrCurr_Write_MtrCurr2_Volts_f32

Global Functions/Macros Defined by this Module

None

Local Functions/Macros Used by this MDD only

None

Software Module Implementation

Runtime Environment (RTE) Initial Values

This section lists the initial values of data written by this module but controlled by the RTE. After RTE initialization, the data in this table will contain these values.

DataValue
Rte_InitValue_ADCMtrCurr1_Volts_f320
Rte_InitValue_ADCMtrCurr2_Volts_f320
Rte_InitValue_ComOffset_Cnt_u160
Rte_InitValue_ CorrMtrCurrPosition _Rev_f320
Rte_InitValue_FiltCntrlTemp_DegC_f320
Rte_InitValue_MEC_Cnt_enum0
Rte_InitValue_MtrCurr1TempOffset_Volt_f320
Rte_InitValue_MtrCurr2TempOffset_Volt_f320
Rte_InitValue_MtrCurrAngle _Rev_f320
0
Rte_InitValue_MtrCurrK1_Amp_f320
Rte_InitValue_MtrCurrK2_Amp_f320
Rte_InitValue_MtrVel_MtrRadpS_f320
Rte_InitValue_SrlComSvcDft_Cnt_b320
Rte_InitValue_Vecu_Volt_f325
Rte_InitValue_VehSpd_Kph_f320
Rte_InitValue_VhSpdValid_Cnt_lgcFALSE
Rte_InitValue_ CurrentGainSvc_Cnt_lgcFALSE

Initialization Functions

Init: CmMtrCurr_Init

Design Rationale

None

Module Outputs

None

Module Internal

IF ((Rte_Pim_ShCurrCal()->EOLMtrCurrVcalCmd_VoltCnts_f32) >= FLT_EPSILON)

MtrCurr1OffDelta_VoltpVoltCnts_M_f32=((Rte_Pim_ShCurrCal()->EOLMtrCurr1OffsetDiff_Volts_f32)/(Rte_Pim_ShCurrCal()->EOLMtrCurrVcalCmd_VoltCnts_f32))

MtrCurr2OffDelta_VoltpVoltCnts_M_f32=((Rte_Pim_ShCurrCal()->EOLMtrCurr2OffsetDiff_Volts_f32)/(Rte_Pim_ShCurrCal()->EOLMtrCurrVcalCmd_VoltCnts_f32))

ELSE

MtrCurr1OffDelta_VoltpVoltCnts_M_f32 = D_ZERO_ULS_F32

MtrCurr2OffDelta_VoltpVoltCnts_M_f32 = D_ZERO_ULS_F32

END

LPF_KUpdate_f32_m (k_CurrCorrErrFiltFc_Hz_f32, D_2MS_SEC_F32, &CurrCorrDiagKSV_M_str)

Periodic Functions

Per: CmMtrCurr_Per1

Design Rationale

None

Program Flow Start

Rte_Call_CmMtrCurr_Per1_CP0_CheckpointReached()

Store Module Inputs to Local copies

FiltCntrlTemp_DegC_T_f32=Rte_IRead_CmMtrCurr_Per1_FiltCntrlTemp_DegC_f32()

Processing

Store Local copy of outputs into Module Outputs

Rte_Iwrite_CmMtrCurr_Per1_MtrCurr1TempOffset_Volt_f32(MtrCurr1TempOffset_Volts_T_f32)

Rte_Iwrite_CmMtrCurr_Per1_MtrCurr2TempOffset_Volt_f32(MtrCurr2TempOffset_Volts_T_f32)

Program Flow End

Rte_Call_CmMtrCurr_Per1_CP1_CheckpointReached()

Per: CmMtrCurr_Per2

Design Rationale

None

Program Flow Start

Rte_Call_CmMtrCurr_Per2_CP0_CheckpointReached()

Store Module Inputs to Local copies

MtrCurrAlpha_Rev_T_f32=Rte_Iread_CmMtrCurr_Per2_MtrCurrAngle_ Rev_f32()

CorrMtrPosElec_Rev_T_f32=Rte_Iread_CmMtrCurr_Per2_CorrMtrCurrPosition_Rev_f32()

MtrCurrK1_Amps_T_f32=Rte_Iread_CmMtrCurr_Per2_MtrCurrK1_Amp_f32()

MtrCurrK2_Amps_T_f32=Rte_Iread_CmMtrCurr_Per2_MtrCurrK2_Amp_f32()

ADCMtrCurr1_Volts_T_f32=Rte_Iread_CmMtrCurr_Per2_ADCMtrCurr1_Volts_f32()

ADCMtrCurr2_Volts_T_f32=Rte_Iread_CmMtrCurr_Per2_ADCMtrCurr2_Volts_f32()

Processing

Store Local copy of outputs into Module Outputs

None

Program Flow End

Rte_Call_CmMtrCurr_Per2_CP1_CheckpointReached()

Per: CmMtrCurr_Per3

Design Rationale

None

Program Flow Start

Rte_Call_CmMtrCurr_Per3_CP0_CheckpointReached()

Store Module Inputs to Local copies

ADCMtrCurr1_Volts_T_f32=Rte_Iread_CmMtrCurr_Per3_ADCMtrCurr1_Volts_f32();

ADCMtrCurr2_Volts_T_f32=Rte_Iread_CmMtrCurr_Per3_ADCMtrCurr2_Volts_f32();

Vecu_Volt_T_f32=Rte_Iread_CmMtrCurr_Per3_Vecu_Volt_f32();

MtrVel_MtrRadpS_T_f32 = Rte_Iread_CmMtrCurr_Per3_MtrVel_MtrRadpS_f32();

VehSpd_Kph_T_f32= Rte_Iread_CmMtrCurr_Per3_VehSpd_Kph_f32();

VhSpdValid_Cnt_T_lgc= Rte_Iread_CmMtrCurr_Per3_VhSpdValid_Cnt_lgc();

SrlComSvcDft_Cnt_T_b32=Rte_Iread_CmMtrCurr_Per3_SrlComSvcDft_Cnt_b32();

CurroffProcessFlag_T_enum=CurroffProcessFlag_M_enum;

Processing

Store Local copy of outputs into Module Outputs

Rte_Iwrite_CmMtrCurr_Per3_ComOffset_Cnt_u16(ComOffset_Cnt_T_u16)

Program Flow End

Rte_Call_CmMtrCurr_Per3_CP1_CheckpointReached()


Fault Recovery Functions

None

Shutdown Functions

None

Interrupt Functions

CurrDQPer1

Design Rationale

None

Program Flow Start

N/A

Store Module Inputs to Local Copies

CmMtrCurr_Read_MRFMtrVel_MtrRadpS_f32(&MRFMtrVel_MtrRadpS_T_f32);

CmMtrCurr_Read_Vecu_Volt_f32(&Vecu_Volt_T_f32);

CmMtrCurr_Read_Phs1Curr_Cnt_u16(&Phs1Curr_Cnt_T_u16);

CmMtrCurr_Read_Phs2Curr_Cnt_u16(&Phs2Curr_Cnt_T_u16);

CmMtrCurr_Read_MtrCurr1TempOffset_Volt_f32(&MtrCurr1TempOffset_Volt_T_f32);

CmMtrCurr_Read_MtrCurr2TempOffset_Volt_f32(&MtrCurr2TempOffset_Volt_T_f32);

CmMtrCurr_Read_MtrElecPol_Cnt_s08(&MtrElecPol_Cnt_T_s08);

CmMtrCurr_Read_MtrPosElec_Rev_u0p16(&MtrPosElec_Rev_T_u0p16);

Processing

Store Local copy of outputs into Module Outputs

CmMtrCurr_Write_ElecPosDelayComp_Rad_f32(ElecPosDelayComp_Rad_T_f32);

CmMtrCurr_Write_MtrCurrQax_Amp_f32(MtrCurrFinalQax_Amps_T_f32);

CmMtrCurr_Write_MtrCurrDax_Amp_f32(MtrCurrFinalDax_Amps_T_f32);

CmMtrCurr_Write_CorrMtrPosElec_Rev_f32(CorrMtrPosElec_Rev_T_f32);

CmMtrCurr_Write_MtrCurrK1_Amps_f32(MtrCurrK1_Amps_T_f32);

CmMtrCurr_Write_MtrCurrK2_Amps_f32(MtrCurrK2_Amps_T_f32);

CmMtrCurr_Write_MtrCurr1_Volts_f32(Phs1Curr_Volts_T_f32);

CmMtrCurr_Write_MtrCurr2_Volts_f32(Phs2Curr_Volts_T_f32);

Program Flow End

N/A

Serial Communication Functions

Scomm: CmMtrCurrTempOffset_Scom_Get

Function Name

CmMtrCurrTempOffset_Scom_Get

TypeMinMaxUTP Tol.
Arguments PassedCurrTempOffCalCurrTempOffsetType *
Return ValuevoidNANANA

Design Rationale

None

Program Flow Start

None

Store Module Inputs to Local copies

None

Processing

Store Local copy of outputs into Module Outputs

None

Program Flow End

None

Scomm: CmMtrCurrTempOffset_Scom_Set

Function NameCmMtrCurrTempOffset_Scom_SetTypeMinMaxUTP Tol.
Arguments PassedCurrTempOffCalCurrTempOffsetType *
Return ValuevoidNANANA

Design Rationale

None

Program Flow Start

None

Store Module Inputs to Local copies

None

Processing

Store Local copy of outputs into Module Outputs

None

Program Flow End

None

Scomm: CmMtrCurr_Scom_CalGain

Function NameCmMtrCurr_Scom_CalGainTypeMinMaxUTP Tol.
Arguments PassedNoneNone
Return ValueRetrunValueStd_ReturnType

Design Rationale

None

Program Flow Start

None

Store Module Inputs to Local copies

Rte_Read_MtrVel_MtrRadpS_f32(&MtrVel_MtrRadpS_T_f32)

Rte_Read_VehSpd_Kph_f32(&VehSpd_Kph_T_f32)

Rte_Read_VhSpdValid_Cnt_lgc(&VhSpdValid_T_Cnt_lgc)

Processing

Store Local copy of outputs into Module Outputs

None

Program Flow End

None

Scomm: CmMtrCurr_Scom_CalOffset

Function NameCmMtrCurr_Scom_CalOffsetTypeMinMaxUTP Tol.
Arguments PassedNoneNone
Return ValueRetrunValueStd_ReturnType

Design Rationale

None

Program Flow Start

None

Store Module Inputs to Local copies

Rte_Read_MtrVel_MtrRadpS_f32(&MtrVel_MtrRadpS_T_f32)

Rte_Read_VehSpd_Kph_f32(&VehSpd_Kph_T_f32)

Rte_Read_VhSpdValid_Cnt_lgc(&VhSpdValid_T_Cnt_lgc)

Processing

Store Local copy of outputs into Module Outputs

Rte_Write_CurrentGainSvc_Cnt_lgc(CurrentGainSvc_Cnt_M_lgc)

Program Flow End

None

Scomm: CmMtrCurr_Scom_MtrCurrOffReadStatus

Function NameCmMtrCurr_Scom_MtrCurrOffReadStatusTypeMinMaxUTP Tol.
Arguments PassedCurrOffStatusMtrCurrOffProcessFlag *
Return ValuevoidNANANA

Design Rationale

None

Program Flow Start

None

Store Module Inputs to Local copies

None

Processing

Store Local copy of outputs into Module Outputs

None

Program Flow End

None

Scomm: CmMtrCurr_Scom_ReadMtrCurrCals

Function NameCmMtrCurr_Scom_ReadMtrCurrCalsTypeMinMaxUTP Tol.
Arguments PassedShCurrCalPtrPhaseCurrCal_DataType *
Return ValuevoidNANANA

Design Rationale

None

Program Flow Start

None

Store Module Inputs to Local copies

None

Processing

Store Local copy of outputs into Module Outputs

None

Program Flow End

None

Scomm: CmMtrCurr_Scom_SetMtrCurrCals

Function NameCmMtrCurr_Scom_SetMtrCurrCalsTypeMinMaxUTP Tol.
Arguments PassedShCurrCalPtrPhaseCurrCal_DataType *
Return ValuevoidNANANA

Design Rationale

None

Program Flow Start

None

Store Module Inputs to Local copies

None

Processing

Store Local copy of outputs into Module Outputs

None

Program Flow End

None


Execution Requirements

Execution Rates for sub-modules called by the Scheduler

This table serves as reference for the Scheduler design

Function NameCalling FrequencySystem State(s) in which the function is called
CmMtrCurr_InitOn InitInit
CmMtrCurr_Per1100msAll
CmMtrCurr_Per22msOperate
CmMtrCurr_Per32msOperate
CurrDQPer1125us (MtrCtrl ISR)All

Execution Requirements for Serial Communication Functions

Function NameSub-Module called by (Serial Comm Function Name)
CmMtrCurr_Scom_CalGain
CmMtrCurr_Scom_CalOffset
CmMtrCurr_Scom_MtrCurrOffReadStatus
CmMtrCurr_Scom_ReadMtrCurrCals
CmMtrCurr_Scom_SetMtrCurrCals
CmMtrCurrTempOffset_Scom_Get
CmMtrCurrTempOffset_Scom_Set


Memory Map Definition Requirements

Sub Modules (Functions)

This table identifies the software segments for functions identified in this module.

Name of Sub ModuleSoftware Segment
CmMtrCurr_InitRTE_START_SEC_SA_CMMTRCURR_APPL_CODE
CmMtrCurr_Per1RTE_START_SEC_SA_CMMTRCURR_APPL_CODE
CmMtrCurr_Per2RTE_START_SEC_SA_CMMTRCURR_APPL_CODE
CmMtrCurr_Per3RTE_START_SEC_SA_CMMTRCURR_APPL_CODE
CurrDQPer1
CmMtrCurr_Scom_CalGainRTE_START_SEC_SA_CMMTRCURR_APPL_CODE
CmMtrCurr_Scom_CalOffsetRTE_START_SEC_SA_CMMTRCURR_APPL_CODE
CmMtrCurr_Scom_MtrCurrOffReadStatusRTE_START_SEC_SA_CMMTRCURR_APPL_CODE
CmMtrCurr_Scom_ReadMtrCurrCalsRTE_START_SEC_SA_CMMTRCURR_APPL_CODE
CmMtrCurr_Scom_SetMtrCurrCalsRTE_START_SEC_SA_CMMTRCURR_APPL_CODE
CmMtrCurrTempOffset_Scom_GetRTE_START_SEC_SA_CMMTRCURR_APPL_CODE
CmMtrCurrTempOffset_Scom_SetRTE_START_SEC_SA_CMMTRCURR_APPL_CODE

Local Functions

This table identifies the software segments for local functions identified in this module.

Name of Sub ModuleSoftware Segment


Known Issues / Limitations With Design

  1. INLINE functions defined in GlobalMacro.h are not unit tested.


Revision Control Log

Rev #Change DescriptionDateAuthor Initials
1.0Initial Version (FDD 01 C Ver 005)01-Dec-12Selva
2.0Configured global read/write macros for global data (anomaly 4696)23-Mar-13OT
3.0Fixes for Anamoly 5561 and A5566 added4-Sep-13Selva
4.0Updated to FDD 01C Ver 00607-Oct-13VK
5.0Anomaly 5967 and 587306-Nov-13SP
6.0Range corrections for ‘MtrCurr1OffDelta_VoltpVoltCnts_M_f32’ and ‘MtrCurr2OffDelta_VoltpVoltCnts_M_f32’9-Nov-13SR
7.0Changed CurrCorrDiag filtering from fixed point to floating point to achieve specified range and resolution – CR 1089520-Nov-13KMC

4 - Data Dictionary


Overview

Change Log
Variable Dictionary
Calibration Dictionary
Global Constants
Template
Help


Sheet 1: Change Log

MtrCurr - Rev 7<- Global Program / Module Name


RevisionAuthorDateChange Description

Data Dictionary Type:Component
1RR20-Jan-12Initial Version



3RR16-Apr-12IPM Changes



4Selva6-Sep-13Updated for the A5561 and A5f66



5SP6-Nov-13Anomaly 5967 and 5873 fixes



6KMC20-Nov-13Changed k_CurrCorrErrFiltKn_Cnt_u16 to k_CurrCorrErrFiltFc_Hz_f32, added variable CurrCorrDiagKSV_M_str for CR 10895; corrected range of input MtrVel_MtrRadpS_f32



7LK24-Jan-14Added, deleted and modified variables and added one new calibration.




















































































































































































































































































































Sheet 2: Variable Dictionary

MtrCurr - Rev 7
Variable Information









Range




Software Variable NameStandard Reference NameDescriptionUsage
(Input, Ouput, ModuleInternal, Display, NonVolatileMemory)
OEMInitalization ValueMinMaxResolutionUnit Test Tolerance (+/-)UnitsTypeMemory Segment
Variables











ADCMtrCurr1_Volt_f32ADC_MtrCurr1_Volts
IN003single precision float
Voltfloat32
ADCMtrCurr2_Volt_f32ADC_MtrCurr2_Volts
IN003single precision float
Voltfloat32
MtrVel_MtrRadpS_f32Motor_Vel_MRF
IN0-11181118single precision float
RadpSecfloat32
MtrPosElec_Rev_G_u0p16CorrectedMtrPos
IN001uint16
Cntfloat32
FiltCntrlTemp_DegC_f32Filt_Meas_Temp
IN0-50150single precision float
Degfloat32
MtrCurrAngle_Rev_f32MtrCurrAplha_eRad
IN001single precision float
Revfloat32
VehSpd_Kph_f32Vehicle_Speed
IN00255single precision float
Kphfloat32
MtrCurr1Offset_Volt_f32MtrCurr1Offset
ON013single precision float
Voltsfloat32
MtrCurr2Offset_Volt_f32MtrCurr2Offset
ON013single precision float
Voltsfloat32
MtrCurrQax_Amps_f32MtrCurrQax_Amps
ON0-550550single precision float3.00E-02Ampfloat32
MtrCurrDax_Amps_f32MtrCurrDax_Amps
ON0-550550single precision float3.00E-02Ampfloat32
MtrElecPosDelay_Rad_f32Pos_Delay_Comp
ON0-3.141592653589793.14159265358979single precision float
Radfloat32
CmMtrCurr_CorrMtrCurr1_Amp_D_f32MtrCurr1_Amps
DN0-550550single precision float
Ampfloat32
CmMtrCurr_CorrMtrCurr2_Amp_D_f32MtrCurr2_Amps
DN0-550550single precision float
Ampfloat32
CmMtrCurr_CorrMtrPosElec_Rev_D_f32CorrMtrCurr_Position
DN00fullsingle precision float
Revfloat32
CmMtrCurr_MtrCurrK1_Amp_D_f32MtrCurr_K1
DN0-550550single precision float
Ampfloat32
CmMtrCurr_MtrCurrK2_Amp_D_f32MtrCurr_K2
DN0-550550single precision float
Ampfloat32
CmMtrCurr_CurrVectPosition_Rev_D_f32CurrVect_Position_eRad
DN001single precision float
Revfloat32
CmMtrCurr_VectPosCosTheta_Uls_D_f32Cos_CVP
DN0-11single precision float
Ulsfloat32
CmMtrCurr_VectPosSinTheta_Uls_D_f32Sin_CVP
DN0-11single precision float
Ulsfloat32
CmMtrCurr_CurrCorrDiag_Amp_D_f32CurrCorr_Diag
DN0-550550single precision float
Ampfloat32
CmMtrCurr_FiltCurrCorrDiag_Amp_D_f32FiltCurrCorr_Diag
DN0-550550single precision float
Ampfloat32
CurrentGainSvc_Cnt_lgcCurrentGainSvc
ON0011
CountBoolean
ComOffset_Cnt_u16ComOffsetReq_Cnts
ON00800011.00E+00Count

CurrentGainSvc_Cnt_M_lgcCurrentGainSvc
MN0011
CountBoolean
CmMtrCurr_CurrCorrDiagKSV_M_str

MN0




LPF32KSV_Str
CurrCorrDiagKSV_M_str.SV_Uls_f32

MN0-550550single precision float1.00E-03Ampfloat32
CurrCorrDiagKSV_M_str.K_Uls_f32

MN000.99998474single precision float5 significant digitsUlsfloat32
VhSpdValid_Cnt_lgcVehicle_Speed_Valid
IN0011
CountBoolean
Vecu_Volt_f32Vecu
IN05310.004
Voltfloat32
MtrCurr1TempOffset_Volt_f32MtrCurr1_TempOffset_Volts
IN0-0.0260.0260.00048828125
Voltfloat32
MtrCurr2TempOffset_Volt_f32MtrCurr1_TempOffset_Volts
IN0-0.0260.0260.00048828125
Voltfloat32
Phs1Curr_Cnt_u16

IN0040951
Countu16
Phs2Curr_Cnt_u16

IN0040951
Countu16
MtrElecPol_Cnt_s08k_System_Polarity.MtrElecMech_Polarity
IN0-111
Countu08
DCPhsBComp_Cnt_u16PWM_Duty_Cycle_1
IN0071501
Countu16
DCPhsCComp_Cnt_u16PWM_Duty_Cycle_2
IN0071501
Countu16
DCPhsCComp_Cnt_u16PWM_Duty_Cycle_1
IN0071501
Countu16
DCPhsBComp_Cnt_u16PWM_Duty_Cycle_2
IN0071501
Countu16
DCPhsAComp_Cnt_u16PWM_Duty_Cycle_1
IN0071501
Countu16
DCPhsBComp_Cnt_u16PWM_Duty_Cycle_2
IN0071501
Countu16
DCPhsBComp_Cnt_u16PWM_Duty_Cycle_1
IN0071501
Countu16
DCPhsAComp_Cnt_u16PWM_Duty_Cycle_2
IN0071501
Countu16
DCPhsAComp_Cnt_u16PWM_Duty_Cycle_1
IN0071501
Countu16
DCPhsCComp_Cnt_u16PWM_Duty_Cycle_2
IN0071501
Countu16
DCPhsCComp_Cnt_u16PWM_Duty_Cycle_1
IN0071501
Countu16
DCPhsAComp_Cnt_u16PWM_Duty_Cycle_2
IN0071501
Countu16
ElecPosDelayComp_Rad_f32Pos_Delay_Comp
ON0






CorrMtrCurrPosition_Rev_f32Buffer write output
ON0






MtrCurrK1_Amps_f32Buffer write output
ON0






MtrCurrK2_Amps_f32Buffer write output
ON0






MtrCurr1_Volts_f32Phy_MtrCurr1_Volts?
ON0






MtrCurr2_Volts_f32Phy_MtrCurr2_Volts?
ON0






CmMtrCurr_MtrCurr1LpFltrSV_Volt_M_u3p29

MN0






CmMtrCurr_MtrCurr2LpFltrSV_Volt_M_u3p29

MN0






CmMtrCurr_FiltMtrCurr1_Volt_M_f32

MN0






CmMtrCurr_FiltMtrCurr2_Volt_M_f32

MN0






CmMtrCurr_MtrCurr1SumHi_Volt_M_f32

MN0






CmMtrCurr_MtrCurr2SumHi_Volt_M_f32

MN0






CmMtrCurr_MtrCurr1SumLo_Volt_M_f32

MN0






CmMtrCurr_MtrCurr2SumLo_Volt_M_f32

MN0






CmMtrCurr_MtrCurr1SumZero_Volt_M_f32

MN0






CmMtrCurr_MtrCurr2SumZero_Volt_M_f32

MN0






CmMtrCurr_VecuSum_Volt_M_f32

MN0






CmMtrCurr_MtrCurr1OffsetHi_Volt_M_f32

MN0






CmMtrCurr_MtrCurr2OffsetHi_Volt_M_f32

MN0






CmMtrCurr_MtrCurr1OffsetLo_Volt_M_f32

MN0






CmMtrCurr_MtrCurr2OffsetLo_Volt_M_f32

MN0






CmMtrCurr_MtrCurr1OffsetZero_Volt_M_f32

MN0






CmMtrCurr_MtrCurr2OffsetZero_Volt_M_f32

MN0






CmMtrCurr_MtrCurrValCmd_VoltCnt_M_f32

MN0






CmMtrCurr_MtrCurr1OffDelta_VoltpVoltCnt_M_f32

MN0






CmMtrCurr_MtrCurr2OffDelta_VoltpVoltCnt_M_f32

MN0






CmMtrCurr_CurrOffAvgCounter_Cnt_M_u16

MN0






CmMtrCurr_CurrOffState_Uls_M_enum

MN0






CmMtrCurr_CurroffProcessFlag_M_enum

MN0






CmMtrCurr_CurrOffTrimFlag_Cnt_M_lgc

MN0






CmMtrCurr_MtrCurr1Offset_Volt_D_f32MtrCurr1_Offset_Volts
DN0fullfullsingle precision float
Voltfloat32
CmMtrCurr_MtrCurr2Offset_Volt_D_f32MtrCurr2_Offset_Volts
DN0fullfullsingle precision float
Voltfloat32
CmMtrCurr_MtrCurr1OffsetDiff_Volt_D_f32N/A
DN0fullfullsingle precision float
Voltfloat32
CmMtrCurr_MtrCurr2OffsetDiff_Volt_D_f32N/A
DN0fullfullsingle precision float
Voltfloat32
CmMtrCurr_Duty1Cnts_Cnt_D_f32N/A
DN0fullfullsingle precision float
Cntfloat32
CmMtrCurr_Duty2Cnts_Cnt_D_f32N/A
DN0fullfullsingle precision float
Cntfloat32
CmMtrCurr_PosDelayCorrMtrPosElec_Rev_D_f32N/A
DN0fullfullsingle precision float
Revfloat32
CmMtrCurr_AdcMtrCurr1_Cnts_D_u16N/A
DN0fullfull1
Cntuint16
CmMtrCurr_AdcMtrCurr2_Cnts_D_u16N/A
DN0fullfull1
Cntuint16
Rte_Pim_ShCurrCal.EOLMtrCurrVcalCmd_VoltCnts_f32

NN0






Rte_Pim_ShCurrCal.EOLMtrCurr1OffsetLo_Volts_f32

NN0






Rte_Pim_ShCurrCal.EOLMtrCurr2OffsetLo_Volts_f32

NN0






Rte_Pim_ShCurrCal.EOLMtrCurr1OffsetDiff_Volts_f32

NN0






Rte_Pim_ShCurrCal.EOLMtrCurr2OffsetDiff_Volts_f32

NN0






Rte_Pim_ShCurrCal.EOLPhscurr1Gain_AmpspVolt_f32

NN0






Rte_Pim_ShCurrCal.EOLPhscurr2Gain_AmpspVolt_f32

NN0






Rte_Pim_CurrTempOffset.CurrTempOffsetX_DegC_s10p5

NN0






Rte_Pim_CurrTempOffset.CurrOffsetY2_Volts_s4p11

NN0






Rte_Pim_CurrTempOffset.CurrOffsetY1_Volts_s4p11

NN0






CmMtrCurr_AdcMtrCurr1_Volt_D_u16N/A
DN0fullfull1
Cntuint16

Sheet 3: Calibration Dictionary

MtrCurr - Rev 7


N
Calibration Information
Achieved in Software Design



Y







Range





P
Software Calibration NameStandard Reference NameFDD ReferenceDescriptionTuning SetOEMDafault ValueMinMaxUnitsTypeMemory Segment



Calibrations














k_CurrCorrErrFiltFc_Hz_f32k_CurrCorrErrFiltKnSF-01C- Current MeasurementFilter_Coeff for CurrentErrNN1.79534290882.5424Hzfloat32




k_CurrCorrErrThresh_Amps_f32k_CurrCorrErrThreshSF-01C- Current Measurement
NN0050Ampfloat32




k_MtrPosComputDelay_Sec_f32k_MtrPosTdelaySF-01C- Current Measurement
NN0.0000960.0000250.0002Secfloat32




k_MtrCurrEOLMinOffset_Volts_f32k_MtrCurrEOLMinOffset_VoltsSF-01C- Current Measurement
NN2.213Voltfloat32




k_MtrCurrEOLMaxOffset_Volts_f32k_MtrCurrEOLMaxOffset_VoltsSF-01C- Current Measurement
NN2.813Voltfloat32




k_MtrCurrEOLMinGain_AmpspVolts_f32k_MtrCurrEOLMinGain_AmpspVoltsSF-01C- Current Measurement
NN9020125AmpspVoltfloat32




k_MtrCurrEOLMaxGain_AmpspVolts_f32k_MtrCurrEOLMaxGain_AmpspVoltsSF-01C- Current Measurement
NN11020125AmpspVoltfloat32




k_CurrGainNumerator_Amps_f32k_CurrGainNumerator_AmpsSF-01C- Current Measurement
NN4510100Ampfloat32




k_MaxCurrOffMtrVel_RadpS_f32k_MaxCurrOffMtrVel_RadpSSF-01C- Current Measurement
NN10-2020MtrRadpSfloat32




k_CurrOffGainKn_Cnt_u16k_CurrOffGainKnSF-01C- Current Measurement
NN1462065535Cntuint16





Sheet 4: Global Constants

MtrCurr - Rev 7








































































Variable Information (Global Variables Only)

Achieved in Software DesignUsed in Module List





Layer 2Layer 3Layer 4Layer 5
Constant NameDescriptionUintsTypeEngineering ValueADCADC DiagnosticsData Memory VerificationDC Link Power ControlDSP Computational IntegrityDSP SPI driverEvent Manager DriverExternal Memory DriverFlash Programming ExecGPIOIllegal OpCode HandlerInterrupt HandlerMotor Current DriverMotor Driver DiagnosticsMotor Position DriverPhase Feedback CapturePowerdown ControlPrimary Shutdown ControlProgram FlowProgram Memory DiagnosticPWM Duty CycleRedundant Memory CheckRedundant Rapid ShutdownSchedulerStack MonitorState Dependent Task ListSystem Boot & StartupSystem ControlTemperature Sensor DiagnosticUnused Interrupt HandlerUtilization MonitorWatchdog DirverSmithBattery VoltageBattery Voltage DiagnosticsDiagnostic CTC ManagerDiagnostic ManagerDiagnostics Application ServicesEOL TorqueTestFlash Boot LoaderFlight RecorderHandwheel PositionHandwheel TorqueMotor Control Output ConversionMotor Position DiagnosticsMotor Position InitializationMotor VelocityMotor Velocity TachometerSerial Communications I/OSerial Communications ServicesStates and ModesTuning SelectVehicle Power ModeVehicle SpeedController PolarityCurrent EstimationHandwheel VelocityInverse Motor ModelMotor Temperature EstimationMotor Torque LimitOutput Reasonableness DianosticParameter EstimationQuadrant and rate DetectionActive Pull CompensationAssistDampingDuty CycleKinematic Integrity DiagnosticLong Term Vehicle Speed DiagnosticMax Assist LimitReturnState Output ControlTorque Output



































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































Sheet 5: Template

2.2aData File:












Header:extern <TYPE><TAB><NAME>;









Source:#pragma DATA_SECTION(<ROOTNAME>, "<SEGMENT>");
<TYPE> <NAME>;










EOL Constants:












Header:extern <TYPE><TAB><NAME>;









Source:#pragma DATA_SECTION(<ROOTNAME>, "<SEGMENT>");
<TYPE> <NAME>;










Global (Embedded) Constants:












Header:#define <NAME><COL40><VALUE>









Calibration Constants:












Tuning ID:



















Tuning:NIndex Range:










Header:extern CONST(<AUTOSAR_TYPE>, CAL_CONST) <NAME>;









Source:#pragma DATA_SECTION(<ROOTNAME>, ".<SEGMENT>");
CONST(<AUTOSAR_TYPE>, CAL_CONST) <NAME> = <VALUE>;










eCal:<NAME>























Tuning:YIndex Range:










Header:<NONCRITICAL>
#define <ROOTNAME><TAB>k_N_CalNC_Cnt_Str.<ROOTNAME>
<NONCRITICAL>
<SAFETYCRITICAL>
#define <ROOTNAME><TAB>k_S_CalSC_Cnt_Str.<ROOTNAME>
<SAFETYCRITICAL>










Source:










eCal:<NONCRITICAL>
k_N_CalNC_Cnt_Str.<ROOTNAME>
<NONCRITICAL>
<SAFETYCRITICAL>
k_S_CalSC_Cnt_Str.<ROOTNAME>
<SAFETYCRITICAL>
























Tuning:PIndex Range:










Header:<NONCRITICAL>
#define <ROOTNAME><TAB>k_N_CalNC_Cnt_Str.Personality[L3_S_CalPersSelect_Cnt_G_u16].<ROOTNAME>
<NONCRITICAL>
<SAFETYCRITICAL>
#define <ROOTNAME><TAB>k_S_CalSC_Cnt_Str.SC_Personality[L3_S_CalPersSelect_Cnt_G_u16].<ROOTNAME>
<SAFETYCRITICAL>










Source:










eCal:<NONCRITICAL>
k_N_CalNC_Cnt_Str.Personality[L3_S_CalPersSelect_Cnt_G_u16].<ROOTNAME>
<NONCRITICAL>
<SAFETYCRITICAL>
k_S_CalSC_Cnt_Str.SC_Personality[L3_S_CalPersSelect_Cnt_G_u16].<ROOTNAME>
<SAFETYCRITICAL>

















Sheet 6: Help

Short cutMacroSescription
Ctrl-qClearDataDictFilterWill clear all autofilters on the Global Data Dictionary




DFD_CreateCreates a Series of Data Flow Worksheet Pages from the information in the data dictionary. If Data Flow Worksheet pages already exist, they will be deleted first.

DFD_DeleteWill clear all Data Flow Diagram pages from the Data Dictionary. This will make the file smaller for archiving.

DFD_PrintFormate and prepares to print the Data Flow Worksheet pages.