LearnEOT

Module -- LrnEOT

High-Level Description

LrnEOT uses vehicle operational information to learn the appropriate end of travel positions for a given system.

Figures

Component Diagram


Module Inputs and Outputs

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 (Global Variable Name)Module Outputs (Global Variable Name)
MtrVelCRF_MtrRadpS_f32CWPosition_HwDeg_f32
HandwheelPosition_HwDeg_f32CCWPosition_HwDeg_f32
HandwheelAuthority_Uls_f32CWFound_Cnt_lgc
HwTorque_HwNm_f32CCWFound_Cnt_lgc
PostLimitTorque_HwNm_f32
DiagStsHwPosDis_Cnt_lgc

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
CcwEOTTimer_mS_M_u3210FullLRNEOT_START_SEC_VAR_32
CwEOTTimer_mS_M_u3210FullLRNEOT_START_SEC_VAR_32
Position1Timer_mS_M_u321FULLFULLLRNEOT_START_SEC_VAR_32
Position2Timer_mS_M_u321FULLFULLLRNEOT_START_SEC_VAR_32
ResetLimitReq_Cnt_M_lgcN/AN/AN/ALRNEOT_START_SEC_VAR_ BOOLEAN

User defined typedef definition/declaration

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

Typedef NameElement NameStorage Type

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_MinRackTrvl_HwDeg_f32
k_MaxRackTrvl_HwDeg_f32
k_AuthorityStartLrn_Uls_f32
k_HwTrqEOTLrn_HwNm_f32
k_MtrVelEOTLrn_MtrRadpS_f32
k_EOTLrnTimer_mS_u16
k_MtrTrqEOTLrn_MtrNm_f32
k_MinResetAuthority_Uls_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 NameResolutionValue
None

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_ZERO_ULS_F32
D_ZERO_CNT_U16

Module specific Lookup Tables Constants

Constant NameResolutionValueSoftware Segment
None

Functions/Macros used by the Sub-Modules

Library Functions / Macros

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

  1. Abs_f32_m()

  2. Max_m()

  3. Min_m()

Data Hiding Functions

The data hiding functions / macros used in this module are identified below,

  1. Rte_Call_LearnedEOTData_SetRamBlockStatus()

  2. Rte_Call_LearnedEOTData_WriteBlock()

Local Functions/Macros Used by this MDD only

The local functions/macros in this module are identified below:

  1. ResetEOT()

Software Module Implementation

Initialization Functions

Init: LrnEOT_Init()

Design Rationale

None

Initialize End-of-Travel

Module Outputs

None

Module Internal

Rte_IWrite_LrnEOT_Init1_CCWFound_Cnt_lgc(Rte_Pim_LearnedEOT()->CCWEOTFound_Cnt_lgc)

Rte_IWrite_LrnEOT_Init1­_CCWPosition_HwDeg_f32(Rte_Pim_LearnedEOT()->CCWEOTPosition_HwDeg_f32)

Rte_IWrite_LrnEOT_Init1_CWFound_Cnt_lgc(Rte_Pim_LearnedEOT()->CWEOTFound_Cnt_lgc)

Rte_IWrite_LrnEOT_Init1_CWPosition_HwDeg_f32(Rte_Pim_LearnedEOT()->CWEOTPosition_HwDeg_f32)

Periodic Functions

Per: LrnEOT_Per1

Design Rationale

None

Program Flow Start

Rte_Call_LrnEOT_Per1_CP0_CheckpointReached

Store Module Inputs to Local copies

Local Variables:

DiagStsHwPosDis_Cnt_T_lgc = Rte_IRead_LrnEOT_Per1_DiagStsHwPosDis_Cnt_lgc()

HandwheelAuthority_Uls_T_f32 = Rte_IRead_LrnEOT_Per1_HandwheelAuthority_Uls_f32()

HandwheelPosition_HwDeg_T_f32 = Rte_IRead_LrnEOT_Per1_HandwheelPosition_HwDeg_f32()

HwTorque_MtrNm_T_f32 = Rte_IRead_LrnEOT_Per1_HwTorque_HwNm_f32()

MtrVel_MtrRadpS_T_f32 = Rte_IRead_LrnEOT_Per1_MtrVelCRF_MtrRadpS_f32()

PostLimitTorque_MtrNm_T_f32 = Rte_IRead_LrnEOT_Per1_PostLimitTorque_MtrNm_f32()

Reset EOT Limits

Learn End of Travel Limits

EOT Learn Complete Indication

Store Local copy of outputs into Module Outputs

PrevLrnPnCntrState_Cnt_M_enum = LrnPnCntrState_Cnt_T_enum

Rte_IWrite_LrnEOT_Per1_CCWFound_Cnt_lgc(Rte_Pim_LearnedEOT()->CCWEOTFound_Cnt_lgc)

Rte_IWrite_LrnEOT_Per1_CCWPosition_HwDeg_f32(Rte_Pim_LearnedEOT()->CCWEOTPosition_HwDeg_f32)

Rte_IWrite_LrnEOT_Per1_CWFound_Cnt_lgc(Rte_Pim_LearnedEOT()->CWEOTFound_Cnt_lgc)

Rte_IWrite_LrnEOT_Per1_CWPosition_HwDeg_f32(Rte_Pim_LearnedEOT()->CWEOTPosition_HwDeg_f32)

Program Flow End

Rte_Call_LrnEOT_Per1_CP1_CheckpointReached


Fault Recovery Functions

None

Shutdown Functions

None

Interrupt Functions

None

Serial Communication Functions

LrnEOT_Scom_ResetEOT

ResetLimitReq_Cnt_M_lgc = True

Local Function/Macro Definitions

Reset End of Travel

Function NameResetEOTTypeMinMax
Arguments Passed
Return Value

Description


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
LrnEOT_Init ()On EventOn Init
LrnEOT_Per1()10mSALL

Execution Requirements for Serial Communication Functions

Function NameSub-Module called by (Serial Comm Function Name)
LrnEOT_Scom_ResetEOT


Memory Map Definition Requirements

Sub Modules (Functions)

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

Name of Sub ModuleSoftware Segment
LrnEOT_Per1RTE_START_SEC_AP_LRNEOT_APPL_CODE
LrnEOT_Scom_ResetEOTRTE_START_SEC_AP_LRNEOT_APPL_CODE

Local Functions

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

Name of Sub ModuleSoftware Segment
ResetEOT


Known Issues / Limitations With Design

  1. Inline functions in GlobalMacro.h are not unit tested.


Revision Control Log

Item #Rev #Change DescriptionDateAuthor Initials
11.0Initial release13Feb12M. Story
22.0Updated ResetEOT function to use WriteBlock API, fixed anomaly 320626-Apr-12VK
33Correction of anomaly 3259, QAC updates29-May-12LWW
44Updated to SF-11 v00220-Jun-12OT
55UTP Fix – calibration name27-Jun-12OT
66Moved RackCentering function to new Ap_LnRkCr component – FDD SF-3918-Aug-12BDO
77Check points flow updated23- Sep -12Selva
88Changed Per1 trigger rate from 4ms to 10ms.22-Oct-12BWL
Last modified October 12, 2025: Initial commit (0347a62)