This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

Polarity (Motor...)

Polarity (Motor…)

Component Documentation

1 - Data Dictionary


Overview

Change Log
Variable Dictionary
Calibration Dictionary
Global Constants
Template
Help


Sheet 1: Change Log

Polarity - Rev 10<- Global Program / Module Name


RevisionAuthorDateChange Description

Data Dictionary Type:Component
9KJS6-Feb-13Updated DD to latest template.



10LWW19-Feb-13Updates per FDD




















































































































































































































































































































































Sheet 2: Variable Dictionary

Polarity - Rev 10

IOMDN
Variable Information

YN










Range











Software Variable NameStandard Reference NameFDD ReferenceDescription[I]nput [O]uput [M]oduleInternal [D]isplay [N]onVolatileMemory UsageOEM1X, 1Y, 1Z, 1I, 1BS 2X, 2Y, 2Z, 2I, 2BS etc Graph SettingsInitalization ValueMinMaxResolutionUnit Test Tolerance (+/-)UnitsTypeMemory Segment






Variables




















HwTrqPolarity_Cnt_s08HwTrq_PolarityFDD25 PolarityAssignments
ON
0-1110Cntsint8







HwPosPolarity_Cnt_s08HwPos_PolarityFDD25 PolarityAssignments
ON
0-1110Cntsint8







MtrPosPolarity_Cnt_s08MtrPos_PolarityFDD25 PolarityAssignments
ON
0-1110Cntsint8







MtrVelPolarity_Cnt_s08MtrVel_PolarityFDD25 PolarityAssignments
ON
0-1110Cntsint8







MtrElecMechPolarity_Cnt_s08MtrElecMech_PolarityFDD25 PolarityAssignments
ON
0-1110Cntsint8







SysC_MtrElecMechPolarity_Cnt_s32SysC_MtrElecMech_PolarityFDD25 PolarityAssignments
ON
0-1110Cntsint32







AssistAssyPolarity_Cnt_s08AssistAssy_PolarityFDD25 PolarityAssignments
ON
0-1110Cntsint8







DiagHwTrqPolarity_Cnt_s08
FDD25 PolarityAssignments
IN
0-111
Cntsint8







DiagHwPosPolarity_Cnt_s08
FDD25 PolarityAssignments
IN
0-111
Cntsint8







DiagMtrPosPolarity_Cnt_s08
FDD25 PolarityAssignments
IN
0-111
Cntsint8







DiagMtrVelPolarity_Cnt_s08
FDD25 PolarityAssignments
IN
0-111
Cntsint8







DiagAssistAssyPolarity_Cnt_s08
FDD25 PolarityAssignments
IN
0-111
Cntsint8







DiagMtrElecMechPolarity_Cnt_s08
FDD25 PolarityAssignments
IN
0-111
Cntsint8












































































































































































































































































































































































































































































































Sheet 3: Calibration Dictionary

Polarity - Rev 10


N
Calibration InformationAchieved in Software Design



Y








Range





P
Software Calibration NameStandard Reference NameFDD ReferenceDescriptionTuning SetOEM1X, 1Y, 1Z, 1I, 1BS 2X, 2Y, 2Z, 2I, 2BS etc Graph SettingsDefault ValueMinMaxUnitsTypeMemory Segment



Calibrations
















Sheet 4: Global Constants

Polarity - Rev 10








































































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
D_ONE_CNT_S8


1








































































D_NEGONE_CNT_S8


-1



































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































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>









A2L Name












Measurement:rte_<SWC>_<NAME>









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.

2 - Polarity_MDD

Module --

High-Level Description

This module implements the polarity assignments for the EPS systems to allow for various configurations of input and output signals for proper alignment.

Figures

Diagram – Component Diagram

Polarity.tif

Diagram – Function Data Sharing

No shared data.


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
DiagHwTrqPolarity_Cnt_s08HwTrqPolarity_Cnt_s08
DiagHwPosPolarity_Cnt_s08HwPosPolarity_Cnt_s08
DiagMtrPosPolarity_Cnt_s08MtrPosPolarity_Cnt_s08
DiagMtrVelPolarity_Cnt_s08MtrVelPolarity_Cnt_s08
DiagMtrElecMechPolarity_Cnt_s08MtrElecMechPolarity_Cnt_s08
DiagAssistAssyPolarity_Cnt_s08AssistAssyPolarity_Cnt_s08
SysC_ MtrElecMechPolarity_Cnt_s32

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 NameData TypeResolution

Legal Range

(min)

Legal Range

(max)

Software Segment
Polarity_Cnt_StrPolarity_DataTypeN/ASee DataTypeSee DataType**NvM/Per-Instance Memory**

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)

Polarity_DataTypePolarity_Cnt_b08uint8FullFull
R_Polarity_Cnt_b08uint8FullFull

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

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_HWTRQPOL_CNT_B081Counts0x01
D_HWPOSPOL_CNT_B081Counts0x02
D_MTRPOSPOL_CNT_B081Counts0x04
D_MTRVELPOL_CNT_B081Counts0x08
D_ASSTASSEMPOL_CNT_B081Counts0x10
D_MTRELECMECHPOL_CNT_B081Counts0x20

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_NEGONE_CNT_S8
D_ONE_CNT_S8

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. None

Data Hiding Functions

  1. Rte_Pim_Polarity_Cnt_Str()

  2. Rte_Call_Polarity_WriteBlock()

Global Functions/Macros Defined by this Module

N/A

Local Functions/Macros Used by this MDD only

GetPolarity

Function NameGetPolarityTypeMinMaxUTP Tol.
Arguments PassedPolarity_Cnt_T_b08uint8FULLFULL
PolarityMask_Cnt_T_b08uint8FULLFULL
Return ValuePolarity_Cnt_T_s08sint8-110

Description

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
AssistAssyPolarity_Cnt_s080
HwPosPolarity_Cnt_s080
HwTrqPolarity_Cnt_s080
MtrElecMechPolarity_Cnt_s080
MtrPosPolarity_Cnt_s080
MtrVelPolarity_Cnt_s080
SysC_ MtrElecMechPolarity_Cnt_s320
DiagHwTrqPolarity_Cnt_s080
DiagHwPosPolarity_Cnt_s080
DiagMtrPosPolarity_Cnt_s080
DiagMtrVelPolarity_Cnt_s080
DiagMtrElecMechPolarity_Cnt_s080
DiagAssistAssyPolarity_Cnt_s080

Initialization Functions

Init: _Init1

Design Rationale

During cold initialization, set all output ports to their values based on the stored polarity calibration.

Program Flow Start

N/A

Store Module Inputs to Local Copies

N/A

Processing

Store Local copy of outputs into Module Outputs

N/A

Program Flow End

N/A

Periodic Functions

Per: Polarity_Per1

Design Rationale

This function is checking the polarity signals sent out to the application against the redundantly stored polarity bitfield. The polarity outputs need to be fed back into this module as an input to insure the check is done on the exact memory locations that are being used during run-time to compute the polarity adjusted signals.

Program Flow Start

Rte_Call_Polarity_Per1_CP0_CheckpointReached()

Store Module Inputs to Local copies

HwTrqPolarity_Cnt_T_s08 = Rte_IRead_Polarity_Per1_DiagHwTrqPolarity_Cnt_s08()

HwPosPolarity_Cnt_T_s08 = Rte_IRead_Polarity_Per1_DiagHwPosPolarity_Cnt_s08()

MtrPosPolarity_Cnt_T_s08 = Rte_IRead_Polarity_Per1_DiagMtrPosPolarity_Cnt_s08()

MtrVelPolarity_Cnt_T_s08 = Rte_IRead_Polarity_Per1_DiagMtrVelPolarity_Cnt_s08()

AssistAssyPolarity_Cnt_T_s08 = Rte_IRead_Polarity_Per1_DiagAssistAssyPolarity_Cnt_s08()

MtrElecMechPolarity_Cnt_T_s08 = Rte_IRead_Polarity_Per1_DiagMtrElecMechPolarity_Cnt_s08()

Processing

Store Local copy of outputs into Module Outputs

None

Program Flow End

Rte_Call_Polarity_Per1_CP1_CheckpointReached()

Serial Communication Functions

SCom: Polarity_SCom_ReadPolarity

Function NamePolarity_SCom_ReadPolarityTypeMinMax
Arguments PassedPolarity_Ptr_T_b08uint8 pointerFULLFULL
Return ValueN/A

Design Rationale

Read and return current polarity calibration to the testing tool.

Program Flow Start

N/A

Store Module Inputs to Local copies

N/A

(Processing of function)

Store Local copy of outputs into Module Outputs

N/A

Program Flow End

N/A

SCom: Polarity_SCom_SetPolarity

Function NamePolarity_SCom_SetPolarityTypeMinMax
Arguments PassedPolarity_Cnt_T_b08uint8FULLFULL
Return ValueN/A

Design Rationale

Suspend and Resume all interrupts are used around the updating of the polarity outputs to prevent the function running the diagnostics (Per1) from interrupting this function before all of the outputs are updated.

Program Flow Start

N/A

Store Module Inputs to Local copies

N/A

Processing

Store Local copy of outputs into Module Outputs

N/A

Program Flow End

N/A


Execution Requirements

Execution Sequence of the Module

N/A

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
Polarity_Init1Executed Once after RTE is startedColdInit
Polarity_Per110msAll

Execution Requirements for Serial Communication Functions

Function NameSub-Module called by (Serial Comm Function Name)
Polarity_SCom_ReadPolarity
Polarity_SCom_SetPolarity


Memory Map Definition Requirements

Sub Modules (Functions)

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

Name of Sub ModuleSoftware Segment
Polarity_Init1
Polarity_Per1
Polarity_SCom_ReadPolarity
Polarity_SCom_SetPolarity

Local Functions

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

Name of Sub ModuleSoftware Segment
GetPolarityInline with calling function


Known Issues / Limitations With Design

Additional Comments

  1. The polarity bits for hand wheel torque, hand wheel position, motor position, and motor velocity (bits 0 - 4) are assumed to be used at the “sensor” level to place the signals in the proper orientation for use within the ECU. For example, hand wheel torque bit should be used to get the torque signals into the Nexteer CRF described in the polarity FDD-25.

  2. Porting a signal from CRF to MRF, or from MRF to CRF, shall be done with the assist assembly polarity bit (bit 5).


Revision Control Log

Item #Rev #Change DescriptionDateAuthor Initials
11Initial MDD23May11NRAR
22Carried over from for component based design14Nov11JWW
33Updates and initial release for component based design21Apr2012KJS
44Update for GSOD redundant output – FDDv00622-Oct-12JWJ
77Updated per FDD requirements19-Feb-13LWW