This is the multi-page printable view of this section. Click here to print.
Polarity (Motor...)
1 - Data Dictionary
Overview
Change LogVariable Dictionary
Calibration Dictionary
Global Constants
Template
Help
Sheet 1: Change Log
Polarity - Rev 10 | <- Global Program / Module Name | ||||||
Revision | Author | Date | Change Description | Data Dictionary Type: | Component | ||
9 | KJS | 6-Feb-13 | Updated DD to latest template. | ||||
10 | LWW | 19-Feb-13 | Updates per FDD | ||||
Sheet 2: Variable Dictionary
Sheet 3: Calibration Dictionary
Sheet 4: Global Constants
Polarity - Rev 10 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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 |
D_ONE_CNT_S8 | 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
D_NEGONE_CNT_S8 | -1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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> | |||||
A2L Name | ||||||
Measurement: | rte_<SWC>_<NAME> | |||||
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. |
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
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 Inputs | Module Outputs | |
---|---|---|
DiagHwTrqPolarity_Cnt_s08 | HwTrqPolarity_Cnt_s08 | |
DiagHwPosPolarity_Cnt_s08 | HwPosPolarity_Cnt_s08 | |
DiagMtrPosPolarity_Cnt_s08 | MtrPosPolarity_Cnt_s08 | |
DiagMtrVelPolarity_Cnt_s08 | MtrVelPolarity_Cnt_s08 | |
DiagMtrElecMechPolarity_Cnt_s08 | MtrElecMechPolarity_Cnt_s08 | |
DiagAssistAssyPolarity_Cnt_s08 | AssistAssyPolarity_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 Name | Data Type | Resolution | Legal Range (min) | Legal Range (max) | Software Segment |
---|---|---|---|---|---|
Polarity_Cnt_Str | Polarity_DataType | N/A | See DataType | See DataType | **NvM/Per-Instance Memory** |
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) |
---|---|---|---|---|
Polarity_DataType | Polarity_Cnt_b08 | uint8 | Full | Full |
R_Polarity_Cnt_b08 | uint8 | 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 |
---|
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_HWTRQPOL_CNT_B08 | 1 | Counts | 0x01 |
D_HWPOSPOL_CNT_B08 | 1 | Counts | 0x02 |
D_MTRPOSPOL_CNT_B08 | 1 | Counts | 0x04 |
D_MTRVELPOL_CNT_B08 | 1 | Counts | 0x08 |
D_ASSTASSEMPOL_CNT_B08 | 1 | Counts | 0x10 |
D_MTRELECMECHPOL_CNT_B08 | 1 | Counts | 0x20 |
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 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,
None
Data Hiding Functions
Rte_Pim_Polarity_Cnt_Str()
Rte_Call_Polarity_WriteBlock()
Global Functions/Macros Defined by this Module
N/A
Local Functions/Macros Used by this MDD only
GetPolarity
Function Name | GetPolarity | Type | Min | Max | UTP Tol. |
---|---|---|---|---|---|
Arguments Passed | Polarity_Cnt_T_b08 | uint8 | FULL | FULL | |
PolarityMask_Cnt_T_b08 | uint8 | FULL | FULL | ||
Return Value | Polarity_Cnt_T_s08 | sint8 | -1 | 1 | 0 |
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.
Data | Value |
---|---|
AssistAssyPolarity_Cnt_s08 | 0 |
HwPosPolarity_Cnt_s08 | 0 |
HwTrqPolarity_Cnt_s08 | 0 |
MtrElecMechPolarity_Cnt_s08 | 0 |
MtrPosPolarity_Cnt_s08 | 0 |
MtrVelPolarity_Cnt_s08 | 0 |
SysC_ MtrElecMechPolarity_Cnt_s32 | 0 |
DiagHwTrqPolarity_Cnt_s08 | 0 |
DiagHwPosPolarity_Cnt_s08 | 0 |
DiagMtrPosPolarity_Cnt_s08 | 0 |
DiagMtrVelPolarity_Cnt_s08 | 0 |
DiagMtrElecMechPolarity_Cnt_s08 | 0 |
DiagAssistAssyPolarity_Cnt_s08 | 0 |
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 Name | Polarity_SCom_ReadPolarity | Type | Min | Max |
---|---|---|---|---|
Arguments Passed | Polarity_Ptr_T_b08 | uint8 pointer | FULL | FULL |
Return Value | N/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 Name | Polarity_SCom_SetPolarity | Type | Min | Max |
---|---|---|---|---|
Arguments Passed | Polarity_Cnt_T_b08 | uint8 | FULL | FULL |
Return Value | N/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 Name | Calling Frequency | System State(s) in which the function is called |
---|---|---|
Polarity_Init1 | Executed Once after RTE is started | ColdInit |
Polarity_Per1 | 10ms | All |
Execution Requirements for Serial Communication Functions
Function Name | Sub-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 Module | Software 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 Module | Software Segment |
---|---|
GetPolarity | Inline with calling function |
Known Issues / Limitations With Design
Additional Comments
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.
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 Description | Date | Author Initials |
---|---|---|---|---|
1 | 1 | Initial MDD | 23May11 | NRAR |
2 | 2 | Carried over from for component based design | 14Nov11 | JWW |
3 | 3 | Updates and initial release for component based design | 21Apr2012 | KJS |
4 | 4 | Update for GSOD redundant output – FDDv006 | 22-Oct-12 | JWJ |
7 | 7 | Updated per FDD requirements | 19-Feb-13 | LWW |