This is the multi-page printable view of this section. Click here to print.
CmMtrCurr
1 - CmMtrCurr Design Review
Overview
Summary SheetSource Code
Data Dictionary
QAC
Sheet 1: Summary Sheet
Sheet 2: Source Code
Rev 3.0 | 11-Dec-13 | |||||||||||||||||||||||
Peer Review Meeting Log (Source Code Review) | ||||||||||||||||||||||||
Source File Name: | Source File Revision: | |||||||||||||||||||||||
Module Design Document Name: | MDD Revision: | |||||||||||||||||||||||
Data Dictionary Revision: | ||||||||||||||||||||||||
Quality Check Items: | ||||||||||||||||||||||||
Yes | No | Rationale is required for all answers of No | ||||||||||||||||||||||
Pre-review checklist (change owners only) | Analysis performed for divide by zero | 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 | X | Comments: | NA | ||||||||||||||||||||
Change log contains detailed description of changes | X | Comments: | NA | |||||||||||||||||||||
Code compared vs requirements (Document or Model) | 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 | 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: | ||||||||||||||||||||||||
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

Sheet 4: QAC
Rev 3.0 | 11-Dec-13 | |||||||||||||||||||||||
Peer Review Meeting Log (QAC Review) | ||||||||||||||||||||||||
Module Name: | Source File Revision: | 18 | Module | 1 | of | 1 | ||||||||||||||||||
Compliance Document Version: | QAC_6 | |||||||||||||||||||||||
Quality Check Items: | ||||||||||||||||||||||||
Yes | No | Rationale is required for all answers of No | ||||||||||||||||||||||
Pre-review checklist for change owners | QAC version is correct and did not change (List version) | X | Comments: | QAC_6 | ||||||||||||||||||||
Contract Folder's header files are appropriate | X | Comments: | ||||||||||||||||||||||
G Group-review Checklist (review board) | 100% Compliance to the MISRA Compliance Document | X | Comments: | No new warnings came | ||||||||||||||||||||
General Notes / Comments: | ||||||||||||||||||||||||
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.2 Functions to be provided to Integration Project 2
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.1 Required Global Data Inputs 5
3.2 Specific Include Path present 5
Dependencies
SWCs
Module | Required 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
Modules | Notes | |
---|---|---|
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
Constant | Notes | SWC |
---|---|---|
MTRCURRPHASEBC | PhaseB and Phase C used in Curr Measurement | |
MTRCURRPHASECB | PhaseC and Phase B used in Curr Measurement | |
MTRCURRPHASEAC | PhaseA and Phase C used in Curr Measurement | |
MTRCURRPHASECA | PhaseC and Phase A used in Curr Measurement | |
MTRCURRPHASEAB | PhaseA and Phase B used in Curr Measurement | |
MTRCURRPHASEBA | PhaseB 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
Constant | Notes | SWC |
---|---|---|
none | ||
Integration
Required Global Data Inputs
Specific Include Path present
Yes
Runnable Scheduling
This section specifies the required runnable scheduling.
Init | Scheduling Requirements | Trigger |
---|---|---|
CmMtrCurr_Init | None | RTE |
Runnable | Scheduling Requirements | Trigger |
---|---|---|
CmMtrCurr_Per2 | None | RTE(2MilliS) |
CmMtrCurr_Per1 | None | RTE(100 MilliS) |
CurrDQPer1 | After DigMSB Signal processing | ISR (50MicroS) |
.
Memory Mapping
Mapping
Memory Section | Contents | Notes |
---|---|---|
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
Feature | RAM | ROM |
---|---|---|
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 Description | Date | Author |
---|---|---|---|
1 | Initial version | 7-Sep- 13 | nzt9hv |
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 Inputs | Module Outputs | |
---|---|---|
FiltCntrlTemp_DegC_f32 | MtrCurr1TempOffset_Volt_f32 | |
MtrCurrAngle_Rev_f32 | MtrCurr2TempOffset_Volt_f32 | |
ComOffset_Cnt_u16 | ||
CorrMtrPosElec_Rev_f32 | CDD_ElecPosDelayComp_Rad_G_f32 | |
MtrCurrK1_Amp_f32 | CDD_MtrElecPol_Cnt_G_s8 | |
MtrCurrK2_Amp_f32 | CDD_MtrCurrQax_Amp_G_f32[] | |
ADCMtrCurr1_Volts_f32 | CDD_MtrCurrDax_Amp_G_f32[] | |
ADCMtrCurr2_Volts_f32 | CDD_CorrMtrPosElec_Rev_G_f32[] | |
Vecu_Volt_f32 | CDD_MtrCurrK1_Amps_G_f32[] | |
MtrVel_MtrRadpS_f32 | CDD_MtrCurrK2_Amps_G_f32[] | |
VehSpd_Kph_f32 | CDD_MtrCurr1_Volts_G_f32[] | |
VhSpdValid_Cnt_lgc | CDD_MtrCurr2_Volts_G_f32[] | |
SrlComSvcDft_Cnt_b32 | CorrMtrCurrPosition_Rev_f32 | |
MEC_Cnt_enum | CurrentGainSvc_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 Name | Resolution | Legal Range (min) | Legal Range (max) | Software Segment |
---|---|---|---|---|
MtrCurr1OffDelta_VoltpVoltCnts_M_f32 | Single precision float | 0.0000125 | 750 | CMMTRCURR_START_SEC_VAR_CLEARED_32 |
MtrCurr2OffDelta_VoltpVoltCnts_M_f32 | single precision float | 0.0000125 | 750 | CMMTRCURR_START_SEC_VAR_CLEARED_32 |
MtrCurr1LpFltrSV_Volts_M_u3p29 | 2^-29 | 0 | 5 | CMMTRCURR_START_SEC_VAR_CLEARED_32 |
MtrCurr2LpFltrSV_Volts_M_u3p29 | 2^-29 | 0 | 5 | CMMTRCURR_START_SEC_VAR_CLEARED_32 |
FiltMtrCurr1_Volts_M_f32 | single precision float | 0 | 5 | CMMTRCURR_START_SEC_VAR_CLEARED_32 |
FiltMtrCurr2_Volts_M_f32 | single precision float | 0 | 5 | CMMTRCURR_START_SEC_VAR_CLEARED_32 |
CurrCorrDiagKSV_M_str | N/A | N/A | N/A | CMMTRCURR_START_SEC_VAR_CLEARED_UNSPECIFIED |
CurrCorrDiagKSV_M_str.SV_Uls_f32 | single precision float | See data dictionary | See data dictionary | CMMTRCURR_START_SEC_VAR_CLEARED_UNSPECIFIED |
CurrCorrDiagKSV_M_str.K_Uls_f32 | single precision float | See data dictionary | See data dictionary | CMMTRCURR_START_SEC_VAR_CLEARED_UNSPECIFIED |
CurroffProcessFlag_M_enum | single precision float | n/a | n/a | CMMTRCURR_START_SEC_VAR_CLEARED_ UNSPECIFIED |
CurrOffTrimFlag_M_lgc | BOOLEAN | True | False | CMMTRCURR_START_SEC_VAR_CLEARED_BOOLEAN |
CurrOffState_ULS_M_enum | N/A | N/A | N/A | CMMTRCURR_START_SEC_VAR_CLEARED_UNSPECIFIED |
MtrCurr1SumHi_Volt_M_f32 | single precision float | 1.0 | 3.0 | CMMTRCURR_START_SEC_VAR_CLEARED_32 |
MtrCurr2SumHi_Volt_M_f32 | single precision float | 1.0 | 3.0 | CMMTRCURR_START_SEC_VAR_CLEARED_32 |
VecuSum_Volt_M_f32 | single precision float | -20 | 20 | CMMTRCURR_START_SEC_VAR_CLEARED_32 |
CurrOffAvgCounter_Cnt_M_u16 | 1 | 0 | 2^16 | CMMTRCURR_START_SEC_VAR_CLEARED_16 |
MtrCurr1OffsetHi_Volts_M_f32 | single precision float | 1.0 | 3.0 | CMMTRCURR_START_SEC_VAR_CLEARED_32 |
MtrCurr2OffsetHi_Volts_M_f32 | single precision float | 1.0 | 3.0 | CMMTRCURR_START_SEC_VAR_CLEARED_32 |
MtrCurrValCmd_VoltCnts_M_f32 | single precision float | 0 | 80000 | CMMTRCURR_START_SEC_VAR_CLEARED_32 |
MtrCurr1SumLo_Volt_M_f32 | single precision float | 1.0 | 3.0 | CMMTRCURR_START_SEC_VAR_CLEARED_32 |
MtrCurr2SumLo_Volt_M_f32 | single precision float | 1.0 | 3.0 | CMMTRCURR_START_SEC_VAR_CLEARED_32 |
MtrCurr1OffsetLo_Volts_M_f32 | single precision float | 1.0 | 3.0 | CMMTRCURR_START_SEC_VAR_CLEARED_32 |
MtrCurr2OffsetLo_Volts_M_f32 | single precision float | 1.0 | 3.0 | CMMTRCURR_START_SEC_VAR_CLEARED_32 |
MtrCurr1SumZero_Volt_M_f32 | single precision float | 1.0 | 3.0 | CMMTRCURR_START_SEC_VAR_CLEARED_32 |
MtrCurr2SumZero_Volt_M_f32 | single precision float | 1.0 | 3.0 | CMMTRCURR_START_SEC_VAR_CLEARED_32 |
MtrCurr1OffsetZero_Volts_M_f32 | single precision float | 1.0 | 3.0 | CMMTRCURR_START_SEC_VAR_CLEARED_32 |
MtrCurr2OffsetZero_Volts_M_f32 | single precision float | 1.0 | 3.0 | CMMTRCURR_START_SEC_VAR_CLEARED_32 |
MtrCurr1offsetDiff_Volt_D_f32 | single precision float | -0.046875 | 0.046875 | CMMTRCURR_START_SEC_VAR_CLEARED_32 |
MtrCurr2offsetDiff_Volt_D_f32 | single precision float | -0.046875 | 0.046875 | CMMTRCURR_START_SEC_VAR_CLEARED_32 |
Duty1Cnts_Cnt_D_f32 | single precision float | 0 | 80000 | CMMTRCURR_START_SEC_VAR_CLEARED_32 |
Duty2Cnts_Cnt_D_f32 | single precision float | 0 | 80000 | CMMTRCURR_START_SEC_VAR_CLEARED_32 |
MtrCurr1Offset_Volt_D_f32 | single precision float | -0.046875 | 0.046875 | CMMTRCURR_START_SEC_VAR_CLEARED_32 |
MtrCurr2Offset_Volt_D_f32 | single precision float | -0.046875 | 0.046875 | CMMTRCURR_START_SEC_VAR_CLEARED_32 |
CorrMtrCurr1_Amps_D_f32 | single precision float | -550 | 550 | CMMTRCURR_START_SEC_VAR_CLEARED_32 |
CorrMtrCurr2_Amps_D_f32 | single precision float | -550 | 550 | CMMTRCURR_START_SEC_VAR_CLEARED_32 |
CorrMtrPosElec_Rev_D_f32 | single precision float | 0 | 1 | CMMTRCURR_START_SEC_VAR_CLEARED_32 |
MtrCurrK1_Amps_D_f32 | single precision float | -550 | 550 | CMMTRCURR_START_SEC_VAR_CLEARED_32 |
MtrCurrK2_Amps_D_f32 | single precision float | -550 | 550 | CMMTRCURR_START_SEC_VAR_CLEARED_32 |
CurrVectPosition_Rev_D_f32 | single precision float | 0 | 1 | CMMTRCURR_START_SEC_VAR_CLEARED_32 |
VectPosCosTheta_Uls_D_f32 | single precision float | -1 | 1 | CMMTRCURR_START_SEC_VAR_CLEARED_32 |
VectPosSinTheta_Uls_D_f32 | single precision float | -1 | 1 | CMMTRCURR_START_SEC_VAR_CLEARED_32 |
CurrCorrDiag_Amps_D_f32 | single precision float | -550 | 550 | CMMTRCURR_START_SEC_VAR_CLEARED_32 |
FiltCurrCorrDiag_Amps_D_f32 | single precision float | -550 | 550 | CMMTRCURR_START_SEC_VAR_CLEARED_32 |
CurrentGainSvc_Cnt_M_lgc | Boolean | 0 | 1 | CMMTRCURR_START_SEC_VAR_CLEARED_BOOLEAN |
User defined typedef definition/declaration
This section documents any user types uniquely used for the module.
Typedef Name | Element Name | User Defined Type | Legal Range (min) | Legal Range (max) |
---|---|---|---|---|
CurrTempOffsetType | CurrTempOffsetX_DegC_s10p5 | CurrTempOffsetTblType | -50 | 150 |
CurrOffsetY1_Volts_s4p11 | CurrTempOffsetTblType | -0.026 | 0.026 | |
CurrOffsetY2_Volts_s4p11 | CurrTempOffsetTblType | -0.026 | 0.026 | |
PhaseCurrCal_DataType | EOLMtrCurrVcalCmd_VoltCnts_f32 | float | 0 | 80000 |
EOLPhscurr1Gain_AmpspVolt_f32 | float | 20 | 125 | |
EOLMtrCurr2OffsetDiff_Volts_f32 | float | 1.0 | 3.0 | |
EOLMtrCurr1OffsetDiff_Volts_f32 | float | 1.0 | 3.0 | |
EOLMtrCurr1OffsetLo_Volts_f32 | float | 1.0 | 3.0 | |
EOLMtrCurr2OffsetLo_Volts_f32 | float | 1.0 | 3.0 | |
EOLPhscurr2Gain_AmpspVolt_f32 | float | 20 | 125 | |
CurrTempOffsetTblType[16] | Sint16 | Full | Full |
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 Name | Resolution | Units | Value |
---|---|---|---|
D_MTRCURROFFHICOMOFF_CNT_U16 | 1 | Counts | 4000 |
D_CURROFFNOOFAVG_CNT_U16 | 1 | Counts | 64 |
D_MTRCURROFFLOCOMOFF_CNT_U16 | 1 | Counts | 500 |
D_MTRCURROFFZEROCOMOFF_CNT_U16 | 1 | Counts | 0 |
D_REVWITHROUND_ULS_F32 | single precision float | Unitless | 65536.5 |
D_SCALERADTOCNTS_ULS_F32 | single precision float | Unitless | 10430.3783505 |
D_ROUND_ULS_F32 | single precision float | Unitless | 0.5 |
D_CNVRTP29TOP13_CNT_U16 | 1 | Counts | 16 |
D_POSITIVEONE_CNT_S8 | 1 | Counts | 1 |
D_ONEDIVSQRT3_F32 | single precision float | Unitless | 0.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 Name | Resolution | Value | Software 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,
Cosf
Sinf
Limit_m
Abs_f32_m
TableSize_m
FPM_FloatToFixed_m
FPM_FixedToFloat_m
IntplVarXY_s16_s16Xs16Y_Cnt
LPF_SvUpdate_u16InFixKTrunc_m
LPF_OpUpdate_u16InFixKTrunc_m
LPF_SvUpdate_s16InFixKTrunc_m
LPF_OpUpdate_s16InFixKTrunc_m
LPF_KUpdate_f32_m
LPF_OpUpdate_f32_m
Data Hiding Functions
CmMtrCurr_Read_MRFMtrVel_MtrRadpS_f32
CmMtrCurr_Read_Vecu_Volt_f32
CmMtrCurr_Read_Phs1Curr_Cnt_u16
CmMtrCurr_Read_Phs2Curr_Cnt_u16
CmMtrCurr_Read_DCPhsAComp_Cnt_u16
CmMtrCurr_Read_DCPhsBComp_Cnt_u16
CmMtrCurr_Read_DCPhsCComp_Cnt_u16
CmMtrCurr_Read_MtrCurr1TempOffset_Volt_f32
CmMtrCurr_Read_MtrCurr2TempOffset_Volt_f32
CmMtrCurr_Read_MtrElecPol_Cnt_s08
CmMtrCurr_Read_MtrPosElec_Rev_u0p16
CmMtrCurr_Write_ElecPosDelayComp_Rad_f32
CmMtrCurr_Write_MtrCurrQax_Amp_f32
CmMtrCurr_Write_MtrCurrDax_Amp_f32
CmMtrCurr_Write_CorrMtrPosElec_Rev_f32
CmMtrCurr_Write_MtrCurrK1_Amps_f32
CmMtrCurr_Write_MtrCurrK2_Amps_f32
CmMtrCurr_Write_MtrCurr1_Volts_f32
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.
Data | Value |
---|---|
Rte_InitValue_ADCMtrCurr1_Volts_f32 | 0 |
Rte_InitValue_ADCMtrCurr2_Volts_f32 | 0 |
Rte_InitValue_ComOffset_Cnt_u16 | 0 |
Rte_InitValue_ CorrMtrCurrPosition _Rev_f32 | 0 |
Rte_InitValue_FiltCntrlTemp_DegC_f32 | 0 |
Rte_InitValue_MEC_Cnt_enum | 0 |
Rte_InitValue_MtrCurr1TempOffset_Volt_f32 | 0 |
Rte_InitValue_MtrCurr2TempOffset_Volt_f32 | 0 |
Rte_InitValue_MtrCurrAngle _Rev_f32 | 0 |
0 | |
Rte_InitValue_MtrCurrK1_Amp_f32 | 0 |
Rte_InitValue_MtrCurrK2_Amp_f32 | 0 |
Rte_InitValue_MtrVel_MtrRadpS_f32 | 0 |
Rte_InitValue_SrlComSvcDft_Cnt_b32 | 0 |
Rte_InitValue_Vecu_Volt_f32 | 5 |
Rte_InitValue_VehSpd_Kph_f32 | 0 |
Rte_InitValue_VhSpdValid_Cnt_lgc | FALSE |
Rte_InitValue_ CurrentGainSvc_Cnt_lgc | FALSE |
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 | Type | Min | Max | UTP Tol. |
Arguments Passed | CurrTempOffCal | CurrTempOffsetType * | |||
Return Value | void | NA | NA | NA |
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 Name | CmMtrCurrTempOffset_Scom_Set | Type | Min | Max | UTP Tol. |
Arguments Passed | CurrTempOffCal | CurrTempOffsetType * | |||
Return Value | void | NA | NA | NA |
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 Name | CmMtrCurr_Scom_CalGain | Type | Min | Max | UTP Tol. |
Arguments Passed | None | None | |||
Return Value | RetrunValue | Std_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 Name | CmMtrCurr_Scom_CalOffset | Type | Min | Max | UTP Tol. |
Arguments Passed | None | None | |||
Return Value | RetrunValue | Std_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 Name | CmMtrCurr_Scom_MtrCurrOffReadStatus | Type | Min | Max | UTP Tol. |
Arguments Passed | CurrOffStatus | MtrCurrOffProcessFlag * | |||
Return Value | void | NA | NA | NA |
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 Name | CmMtrCurr_Scom_ReadMtrCurrCals | Type | Min | Max | UTP Tol. |
Arguments Passed | ShCurrCalPtr | PhaseCurrCal_DataType * | |||
Return Value | void | NA | NA | NA |
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 Name | CmMtrCurr_Scom_SetMtrCurrCals | Type | Min | Max | UTP Tol. |
Arguments Passed | ShCurrCalPtr | PhaseCurrCal_DataType * | |||
Return Value | void | NA | NA | NA |
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 Name | Calling Frequency | System State(s) in which the function is called |
---|---|---|
CmMtrCurr_Init | On Init | Init |
CmMtrCurr_Per1 | 100ms | All |
CmMtrCurr_Per2 | 2ms | Operate |
CmMtrCurr_Per3 | 2ms | Operate |
CurrDQPer1 | 125us (MtrCtrl ISR) | All |
Execution Requirements for Serial Communication Functions
Function Name | Sub-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 Module | Software Segment |
---|---|
CmMtrCurr_Init | RTE_START_SEC_SA_CMMTRCURR_APPL_CODE |
CmMtrCurr_Per1 | RTE_START_SEC_SA_CMMTRCURR_APPL_CODE |
CmMtrCurr_Per2 | RTE_START_SEC_SA_CMMTRCURR_APPL_CODE |
CmMtrCurr_Per3 | RTE_START_SEC_SA_CMMTRCURR_APPL_CODE |
CurrDQPer1 | |
CmMtrCurr_Scom_CalGain | RTE_START_SEC_SA_CMMTRCURR_APPL_CODE |
CmMtrCurr_Scom_CalOffset | RTE_START_SEC_SA_CMMTRCURR_APPL_CODE |
CmMtrCurr_Scom_MtrCurrOffReadStatus | RTE_START_SEC_SA_CMMTRCURR_APPL_CODE |
CmMtrCurr_Scom_ReadMtrCurrCals | RTE_START_SEC_SA_CMMTRCURR_APPL_CODE |
CmMtrCurr_Scom_SetMtrCurrCals | RTE_START_SEC_SA_CMMTRCURR_APPL_CODE |
CmMtrCurrTempOffset_Scom_Get | RTE_START_SEC_SA_CMMTRCURR_APPL_CODE |
CmMtrCurrTempOffset_Scom_Set | RTE_START_SEC_SA_CMMTRCURR_APPL_CODE |
Local Functions
This table identifies the software segments for local functions identified in this module.
Name of Sub Module | Software Segment |
---|---|
Known Issues / Limitations With Design
INLINE functions defined in GlobalMacro.h are not unit tested.
Revision Control Log
Rev # | Change Description | Date | Author Initials |
1.0 | Initial Version (FDD 01 C Ver 005) | 01-Dec-12 | Selva |
2.0 | Configured global read/write macros for global data (anomaly 4696) | 23-Mar-13 | OT |
3.0 | Fixes for Anamoly 5561 and A5566 added | 4-Sep-13 | Selva |
4.0 | Updated to FDD 01C Ver 006 | 07-Oct-13 | VK |
5.0 | Anomaly 5967 and 5873 | 06-Nov-13 | SP |
6.0 | Range corrections for ‘MtrCurr1OffDelta_VoltpVoltCnts_M_f32’ and ‘MtrCurr2OffDelta_VoltpVoltCnts_M_f32’ | 9-Nov-13 | SR |
7.0 | Changed CurrCorrDiag filtering from fixed point to floating point to achieve specified range and resolution – CR 10895 | 20-Nov-13 | KMC |
4 - Data Dictionary
Overview
Change LogVariable Dictionary
Calibration Dictionary
Global Constants
Template
Help
Sheet 1: Change Log
MtrCurr - Rev 7 | <- Global Program / Module Name | ||||||
Revision | Author | Date | Change Description | Data Dictionary Type: | Component | ||
1 | RR | 20-Jan-12 | Initial Version | ||||
3 | RR | 16-Apr-12 | IPM Changes | ||||
4 | Selva | 6-Sep-13 | Updated for the A5561 and A5f66 | ||||
5 | SP | 6-Nov-13 | Anomaly 5967 and 5873 fixes | ||||
6 | KMC | 20-Nov-13 | Changed k_CurrCorrErrFiltKn_Cnt_u16 to k_CurrCorrErrFiltFc_Hz_f32, added variable CurrCorrDiagKSV_M_str for CR 10895; corrected range of input MtrVel_MtrRadpS_f32 | ||||
7 | LK | 24-Jan-14 | Added, deleted and modified variables and added one new calibration. | ||||
Sheet 2: Variable Dictionary
MtrCurr - Rev 7 | ||||||||||||
Variable Information | ||||||||||||
Range | ||||||||||||
Software Variable Name | Standard Reference Name | Description | Usage (Input, Ouput, ModuleInternal, Display, NonVolatileMemory) | OEM | Initalization Value | Min | Max | Resolution | Unit Test Tolerance (+/-) | Units | Type | Memory Segment |
Variables | ||||||||||||
ADCMtrCurr1_Volt_f32 | ADC_MtrCurr1_Volts | I | N | 0 | 0 | 3 | single precision float | Volt | float32 | |||
ADCMtrCurr2_Volt_f32 | ADC_MtrCurr2_Volts | I | N | 0 | 0 | 3 | single precision float | Volt | float32 | |||
MtrVel_MtrRadpS_f32 | Motor_Vel_MRF | I | N | 0 | -1118 | 1118 | single precision float | RadpSec | float32 | |||
MtrPosElec_Rev_G_u0p16 | CorrectedMtrPos | I | N | 0 | 0 | 1 | uint16 | Cnt | float32 | |||
FiltCntrlTemp_DegC_f32 | Filt_Meas_Temp | I | N | 0 | -50 | 150 | single precision float | Deg | float32 | |||
MtrCurrAngle_Rev_f32 | MtrCurrAplha_eRad | I | N | 0 | 0 | 1 | single precision float | Rev | float32 | |||
VehSpd_Kph_f32 | Vehicle_Speed | I | N | 0 | 0 | 255 | single precision float | Kph | float32 | |||
MtrCurr1Offset_Volt_f32 | MtrCurr1Offset | O | N | 0 | 1 | 3 | single precision float | Volts | float32 | |||
MtrCurr2Offset_Volt_f32 | MtrCurr2Offset | O | N | 0 | 1 | 3 | single precision float | Volts | float32 | |||
MtrCurrQax_Amps_f32 | MtrCurrQax_Amps | O | N | 0 | -550 | 550 | single precision float | 3.00E-02 | Amp | float32 | ||
MtrCurrDax_Amps_f32 | MtrCurrDax_Amps | O | N | 0 | -550 | 550 | single precision float | 3.00E-02 | Amp | float32 | ||
CmMtrCurr_CorrMtrCurr1_Amp_D_f32 | MtrCurr1_Amps | D | N | 0 | -550 | 550 | single precision float | Amp | float32 | |||
CmMtrCurr_CorrMtrCurr2_Amp_D_f32 | MtrCurr2_Amps | D | N | 0 | -550 | 550 | single precision float | Amp | float32 | |||
CmMtrCurr_CorrMtrPosElec_Rev_D_f32 | CorrMtrCurr_Position | D | N | 0 | 0 | full | single precision float | Rev | float32 | |||
CmMtrCurr_MtrCurrK1_Amp_D_f32 | MtrCurr_K1 | D | N | 0 | -550 | 550 | single precision float | Amp | float32 | |||
CmMtrCurr_MtrCurrK2_Amp_D_f32 | MtrCurr_K2 | D | N | 0 | -550 | 550 | single precision float | Amp | float32 | |||
CmMtrCurr_CurrVectPosition_Rev_D_f32 | CurrVect_Position_eRad | D | N | 0 | 0 | 1 | single precision float | Rev | float32 | |||
CmMtrCurr_VectPosCosTheta_Uls_D_f32 | Cos_CVP | D | N | 0 | -1 | 1 | single precision float | Uls | float32 | |||
CmMtrCurr_VectPosSinTheta_Uls_D_f32 | Sin_CVP | D | N | 0 | -1 | 1 | single precision float | Uls | float32 | |||
CmMtrCurr_CurrCorrDiag_Amp_D_f32 | CurrCorr_Diag | D | N | 0 | -550 | 550 | single precision float | Amp | float32 | |||
CmMtrCurr_FiltCurrCorrDiag_Amp_D_f32 | FiltCurrCorr_Diag | D | N | 0 | -550 | 550 | single precision float | Amp | float32 | |||
CurrentGainSvc_Cnt_lgc | CurrentGainSvc | O | N | 0 | 0 | 1 | 1 | Count | Boolean | |||
ComOffset_Cnt_u16 | ComOffsetReq_Cnts | O | N | 0 | 0 | 8000 | 1 | 1.00E+00 | Count | |||
CurrentGainSvc_Cnt_M_lgc | CurrentGainSvc | M | N | 0 | 0 | 1 | 1 | Count | Boolean | |||
CmMtrCurr_CurrCorrDiagKSV_M_str | M | N | 0 | LPF32KSV_Str | ||||||||
CurrCorrDiagKSV_M_str.SV_Uls_f32 | M | N | 0 | -550 | 550 | single precision float | 1.00E-03 | Amp | float32 | |||
CurrCorrDiagKSV_M_str.K_Uls_f32 | M | N | 0 | 0 | 0.99998474 | single precision float | 5 significant digits | Uls | float32 | |||
VhSpdValid_Cnt_lgc | Vehicle_Speed_Valid | I | N | 0 | 0 | 1 | 1 | Count | Boolean | |||
Vecu_Volt_f32 | Vecu | I | N | 0 | 5 | 31 | 0.004 | Volt | float32 | |||
MtrCurr1TempOffset_Volt_f32 | MtrCurr1_TempOffset_Volts | I | N | 0 | -0.026 | 0.026 | 0.00048828125 | Volt | float32 | |||
MtrCurr2TempOffset_Volt_f32 | MtrCurr1_TempOffset_Volts | I | N | 0 | -0.026 | 0.026 | 0.00048828125 | Volt | float32 | |||
Phs1Curr_Cnt_u16 | I | N | 0 | 0 | 4095 | 1 | Count | u16 | ||||
Phs2Curr_Cnt_u16 | I | N | 0 | 0 | 4095 | 1 | Count | u16 | ||||
MtrElecPol_Cnt_s08 | k_System_Polarity.MtrElecMech_Polarity | I | N | 0 | -1 | 1 | 1 | Count | u08 | |||
DCPhsBComp_Cnt_u16 | PWM_Duty_Cycle_1 | I | N | 0 | 0 | 7150 | 1 | Count | u16 | |||
DCPhsCComp_Cnt_u16 | PWM_Duty_Cycle_2 | I | N | 0 | 0 | 7150 | 1 | Count | u16 | |||
DCPhsCComp_Cnt_u16 | PWM_Duty_Cycle_1 | I | N | 0 | 0 | 7150 | 1 | Count | u16 | |||
DCPhsBComp_Cnt_u16 | PWM_Duty_Cycle_2 | I | N | 0 | 0 | 7150 | 1 | Count | u16 | |||
DCPhsAComp_Cnt_u16 | PWM_Duty_Cycle_1 | I | N | 0 | 0 | 7150 | 1 | Count | u16 | |||
DCPhsBComp_Cnt_u16 | PWM_Duty_Cycle_2 | I | N | 0 | 0 | 7150 | 1 | Count | u16 | |||
DCPhsBComp_Cnt_u16 | PWM_Duty_Cycle_1 | I | N | 0 | 0 | 7150 | 1 | Count | u16 | |||
DCPhsAComp_Cnt_u16 | PWM_Duty_Cycle_2 | I | N | 0 | 0 | 7150 | 1 | Count | u16 | |||
DCPhsAComp_Cnt_u16 | PWM_Duty_Cycle_1 | I | N | 0 | 0 | 7150 | 1 | Count | u16 | |||
DCPhsCComp_Cnt_u16 | PWM_Duty_Cycle_2 | I | N | 0 | 0 | 7150 | 1 | Count | u16 | |||
DCPhsCComp_Cnt_u16 | PWM_Duty_Cycle_1 | I | N | 0 | 0 | 7150 | 1 | Count | u16 | |||
DCPhsAComp_Cnt_u16 | PWM_Duty_Cycle_2 | I | N | 0 | 0 | 7150 | 1 | Count | u16 | |||
ElecPosDelayComp_Rad_f32 | Pos_Delay_Comp | O | N | 0 | ||||||||
CorrMtrCurrPosition_Rev_f32 | Buffer write output | O | N | 0 | ||||||||
MtrCurrK1_Amps_f32 | Buffer write output | O | N | 0 | ||||||||
MtrCurrK2_Amps_f32 | Buffer write output | O | N | 0 | ||||||||
MtrCurr1_Volts_f32 | Phy_MtrCurr1_Volts? | O | N | 0 | ||||||||
MtrCurr2_Volts_f32 | Phy_MtrCurr2_Volts? | O | N | 0 | ||||||||
CmMtrCurr_MtrCurr1LpFltrSV_Volt_M_u3p29 | M | N | 0 | |||||||||
CmMtrCurr_MtrCurr2LpFltrSV_Volt_M_u3p29 | M | N | 0 | |||||||||
CmMtrCurr_FiltMtrCurr1_Volt_M_f32 | M | N | 0 | |||||||||
CmMtrCurr_FiltMtrCurr2_Volt_M_f32 | M | N | 0 | |||||||||
CmMtrCurr_MtrCurr1SumHi_Volt_M_f32 | M | N | 0 | |||||||||
CmMtrCurr_MtrCurr2SumHi_Volt_M_f32 | M | N | 0 | |||||||||
CmMtrCurr_MtrCurr1SumLo_Volt_M_f32 | M | N | 0 | |||||||||
CmMtrCurr_MtrCurr2SumLo_Volt_M_f32 | M | N | 0 | |||||||||
CmMtrCurr_MtrCurr1SumZero_Volt_M_f32 | M | N | 0 | |||||||||
CmMtrCurr_MtrCurr2SumZero_Volt_M_f32 | M | N | 0 | |||||||||
CmMtrCurr_VecuSum_Volt_M_f32 | M | N | 0 | |||||||||
CmMtrCurr_MtrCurr1OffsetHi_Volt_M_f32 | M | N | 0 | |||||||||
CmMtrCurr_MtrCurr2OffsetHi_Volt_M_f32 | M | N | 0 | |||||||||
CmMtrCurr_MtrCurr1OffsetLo_Volt_M_f32 | M | N | 0 | |||||||||
CmMtrCurr_MtrCurr2OffsetLo_Volt_M_f32 | M | N | 0 | |||||||||
CmMtrCurr_MtrCurr1OffsetZero_Volt_M_f32 | M | N | 0 | |||||||||
CmMtrCurr_MtrCurr2OffsetZero_Volt_M_f32 | M | N | 0 | |||||||||
CmMtrCurr_MtrCurrValCmd_VoltCnt_M_f32 | M | N | 0 | |||||||||
CmMtrCurr_MtrCurr1OffDelta_VoltpVoltCnt_M_f32 | M | N | 0 | |||||||||
CmMtrCurr_MtrCurr2OffDelta_VoltpVoltCnt_M_f32 | M | N | 0 | |||||||||
CmMtrCurr_CurrOffAvgCounter_Cnt_M_u16 | M | N | 0 | |||||||||
CmMtrCurr_CurrOffState_Uls_M_enum | M | N | 0 | |||||||||
CmMtrCurr_CurroffProcessFlag_M_enum | M | N | 0 | |||||||||
CmMtrCurr_CurrOffTrimFlag_Cnt_M_lgc | M | N | 0 | |||||||||
CmMtrCurr_MtrCurr1Offset_Volt_D_f32 | MtrCurr1_Offset_Volts | D | N | 0 | full | full | single precision float | Volt | float32 | |||
CmMtrCurr_MtrCurr2Offset_Volt_D_f32 | MtrCurr2_Offset_Volts | D | N | 0 | full | full | single precision float | Volt | float32 | |||
CmMtrCurr_MtrCurr1OffsetDiff_Volt_D_f32 | N/A | D | N | 0 | full | full | single precision float | Volt | float32 | |||
CmMtrCurr_MtrCurr2OffsetDiff_Volt_D_f32 | N/A | D | N | 0 | full | full | single precision float | Volt | float32 | |||
CmMtrCurr_Duty1Cnts_Cnt_D_f32 | N/A | D | N | 0 | full | full | single precision float | Cnt | float32 | |||
CmMtrCurr_Duty2Cnts_Cnt_D_f32 | N/A | D | N | 0 | full | full | single precision float | Cnt | float32 | |||
CmMtrCurr_PosDelayCorrMtrPosElec_Rev_D_f32 | N/A | D | N | 0 | full | full | single precision float | Rev | float32 | |||
CmMtrCurr_AdcMtrCurr1_Cnts_D_u16 | N/A | D | N | 0 | full | full | 1 | Cnt | uint16 | |||
CmMtrCurr_AdcMtrCurr2_Cnts_D_u16 | N/A | D | N | 0 | full | full | 1 | Cnt | uint16 | |||
Rte_Pim_ShCurrCal.EOLMtrCurrVcalCmd_VoltCnts_f32 | N | N | 0 | |||||||||
Rte_Pim_ShCurrCal.EOLMtrCurr1OffsetLo_Volts_f32 | N | N | 0 | |||||||||
Rte_Pim_ShCurrCal.EOLMtrCurr2OffsetLo_Volts_f32 | N | N | 0 | |||||||||
Rte_Pim_ShCurrCal.EOLMtrCurr1OffsetDiff_Volts_f32 | N | N | 0 | |||||||||
Rte_Pim_ShCurrCal.EOLMtrCurr2OffsetDiff_Volts_f32 | N | N | 0 | |||||||||
Rte_Pim_ShCurrCal.EOLPhscurr1Gain_AmpspVolt_f32 | N | N | 0 | |||||||||
Rte_Pim_ShCurrCal.EOLPhscurr2Gain_AmpspVolt_f32 | N | N | 0 | |||||||||
Rte_Pim_CurrTempOffset.CurrTempOffsetX_DegC_s10p5 | N | N | 0 | |||||||||
Rte_Pim_CurrTempOffset.CurrOffsetY2_Volts_s4p11 | N | N | 0 | |||||||||
Rte_Pim_CurrTempOffset.CurrOffsetY1_Volts_s4p11 | N | N | 0 | |||||||||
CmMtrCurr_AdcMtrCurr1_Volt_D_u16 | N/A | D | N | 0 | full | full | 1 | Cnt | uint16 |
Sheet 3: Calibration Dictionary
MtrCurr - Rev 7 | N | |||||||||||||||
Calibration Information | Achieved in Software Design | Y | ||||||||||||||
Range | P | |||||||||||||||
Software Calibration Name | Standard Reference Name | FDD Reference | Description | Tuning Set | OEM | Dafault Value | Min | Max | Units | Type | Memory Segment | |||||
Calibrations | ||||||||||||||||
k_CurrCorrErrFiltFc_Hz_f32 | k_CurrCorrErrFiltKn | SF-01C- Current Measurement | Filter_Coeff for CurrentErr | N | N | 1.7953429 | 0 | 882.5424 | Hz | float32 | ||||||
k_CurrCorrErrThresh_Amps_f32 | k_CurrCorrErrThresh | SF-01C- Current Measurement | N | N | 0 | 0 | 50 | Amp | float32 | |||||||
k_MtrPosComputDelay_Sec_f32 | k_MtrPosTdelay | SF-01C- Current Measurement | N | N | 0.000096 | 0.000025 | 0.0002 | Sec | float32 | |||||||
k_MtrCurrEOLMinOffset_Volts_f32 | k_MtrCurrEOLMinOffset_Volts | SF-01C- Current Measurement | N | N | 2.2 | 1 | 3 | Volt | float32 | |||||||
k_MtrCurrEOLMaxOffset_Volts_f32 | k_MtrCurrEOLMaxOffset_Volts | SF-01C- Current Measurement | N | N | 2.8 | 1 | 3 | Volt | float32 | |||||||
k_MtrCurrEOLMinGain_AmpspVolts_f32 | k_MtrCurrEOLMinGain_AmpspVolts | SF-01C- Current Measurement | N | N | 90 | 20 | 125 | AmpspVolt | float32 | |||||||
k_MtrCurrEOLMaxGain_AmpspVolts_f32 | k_MtrCurrEOLMaxGain_AmpspVolts | SF-01C- Current Measurement | N | N | 110 | 20 | 125 | AmpspVolt | float32 | |||||||
k_CurrGainNumerator_Amps_f32 | k_CurrGainNumerator_Amps | SF-01C- Current Measurement | N | N | 45 | 10 | 100 | Amp | float32 | |||||||
k_MaxCurrOffMtrVel_RadpS_f32 | k_MaxCurrOffMtrVel_RadpS | SF-01C- Current Measurement | N | N | 10 | -20 | 20 | MtrRadpS | float32 | |||||||
k_CurrOffGainKn_Cnt_u16 | k_CurrOffGainKn | SF-01C- Current Measurement | N | N | 1462 | 0 | 65535 | Cnt | uint16 |
Sheet 4: Global Constants
MtrCurr - Rev 7 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Variable Information (Global Variables Only) | Achieved in Software Design | Used in Module List | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Layer 2 | Layer 3 | Layer 4 | Layer 5 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Constant Name | Description | Uints | Type | Engineering Value | ADC | ADC Diagnostics | Data Memory Verification | DC Link Power Control | DSP Computational Integrity | DSP SPI driver | Event Manager Driver | External Memory Driver | Flash Programming Exec | GPIO | Illegal OpCode Handler | Interrupt Handler | Motor Current Driver | Motor Driver Diagnostics | Motor Position Driver | Phase Feedback Capture | Powerdown Control | Primary Shutdown Control | Program Flow | Program Memory Diagnostic | PWM Duty Cycle | Redundant Memory Check | Redundant Rapid Shutdown | Scheduler | Stack Monitor | State Dependent Task List | System Boot & Startup | System Control | Temperature Sensor Diagnostic | Unused Interrupt Handler | Utilization Monitor | Watchdog Dirver | Smith | Battery Voltage | Battery Voltage Diagnostics | Diagnostic CTC Manager | Diagnostic Manager | Diagnostics Application Services | EOL TorqueTest | Flash Boot Loader | Flight Recorder | Handwheel Position | Handwheel Torque | Motor Control Output Conversion | Motor Position Diagnostics | Motor Position Initialization | Motor Velocity | Motor Velocity Tachometer | Serial Communications I/O | Serial Communications Services | States and Modes | Tuning Select | Vehicle Power Mode | Vehicle Speed | Controller Polarity | Current Estimation | Handwheel Velocity | Inverse Motor Model | Motor Temperature Estimation | Motor Torque Limit | Output Reasonableness Dianostic | Parameter Estimation | Quadrant and rate Detection | Active Pull Compensation | Assist | Damping | Duty Cycle | Kinematic Integrity Diagnostic | Long Term Vehicle Speed Diagnostic | Max Assist Limit | Return | State Output Control | Torque Output |
Sheet 5: Template
2.2a | Data 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: | N | Index 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: | Y | Index 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: | P | Index 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 cut | Macro | Sescription |
Ctrl-q | ClearDataDictFilter | Will clear all autofilters on the Global Data Dictionary |
DFD_Create | Creates 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_Delete | Will clear all Data Flow Diagram pages from the Data Dictionary. This will make the file smaller for archiving. | |
DFD_Print | Formate and prepares to print the Data Flow Worksheet pages. |