Fee_Interface_MDD

Module --

High-Level Description

This module contains the specific interfacing functions that are needed for TI’s Fee Driver. This includes an initialization routine and configurable trusted function interfaces that allow compatibility with the NvM/MemIf BSW.

Figures

Diagram – Function Data Sharing

N/A

Diagram – Function (Name)

N/A


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

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

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)

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

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

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

Global Functions/Macros Defined by this Module

Global Functions Defined if BC_FEEIF_ECUSTARTUPTRUSTED == STD_OFF

TWrapC_FeeIf_Init

This is the client (non-trusted) side of the FeeIf_Init Trusted Function

Function NameTWrapC_FeeIf_InitTypeMinMaxUTP Tol.
Arguments PassedNone
Return ValueN/A
Description

TRUSTED_TWrapS_FeeIf_Init

This is the server (trusted) side of the FeeIf_Init Trusted Function

Function NameTRUSTED_TWrapS_FeeIf_InitTypeMinMaxUTP Tol.
Arguments PassedFunctionIndexTrustedFunctionIndexType
FunctionParamsTrustedFunctionParameterRefType
Return ValueN/A
Description

TWrapC_Fee_MainFunction

This is the client (non-trusted) side of the Fee_MainFunction Trusted Function

Function NameTWrapC_Fee_MainFunctionTypeMinMaxUTP Tol.
Arguments PassedNone
Return ValueN/A
Description

TRUSTED_TWrapS_Fee_MainFunction

This is the server (trusted) side of the Fee_MainFunction Trusted Function

Function NameTRUSTED_TWrapS_Fee_MainFunctionTypeMinMaxUTP Tol.
Arguments PassedFunctionIndexTrustedFunctionIndexType
FunctionParamsTrustedFunctionParameterRefType
Return ValueN/A
Description

Global Functions Defined if BC_FEEIF_NVMTRUSTED == STD_OFF

TWrapC_Fee_Read

This is the client (non-trusted) side of the Fee_Read Trusted Function

Function NameTWrapC_Fee_ReadTypeMinMaxUTP Tol.
Arguments PassedBlockNumberuint16
BlockOffsetuint16
DataBufferPtruint8*
Lengthuint16
Return Valuemyargs.TWrapS_Fee_Read_args.os_resultStd_ReturnType
Description

TRUSTED_TWrapS_Fee_Read

This is the server (trusted) side of the Fee_Read Trusted Function

Function NameTRUSTED_TWrapS_Fee_ReadTypeMinMaxUTP Tol.
Arguments PassedFunctionIndexTrustedFunctionIndexType
FunctionParamsTrustedFunctionParameterRefType
Return ValueN/A
Description

TWrapC_Fee_Write

This is the client (non-trusted) side of the Fee_Write Trusted Function

Function NameTWrapC_Fee_WriteTypeMinMaxUTP Tol.
Arguments PassedBlockNumberuint16
DataBufferPtruint8*
Return Valuemyargs.TWrapS_Fee_Write_args.os_resultStd_ReturnType
Description

TRUSTED_TWrapS_Fee_Write

This is the server (trusted) side of the Fee_Write Trusted Function

Function NameTRUSTED_TWrapS_Fee_WriteTypeMinMaxUTP Tol.
Arguments PassedFunctionIndexTrustedFunctionIndexType
FunctionParamsTrustedFunctionParameterRefType
Return ValueN/A
Description

TWrapC_Fee_EraseImmediateBlock

This is the client (non-trusted) side of the Fee_EraseImmediateBlock Trusted Function

Function NameTWrapC_Fee_EraseImmediateBlockTypeMinMaxUTP Tol.
Arguments PassedBlockNumberuint16
Return Valuemyargs.TWrapS_Fee_EraseImmediateBlock_args.os_resultStd_ReturnType
Description

TRUSTED_TWrapS_Fee_EraseImmediateBlock

This is the server (trusted) side of the Fee_EraseImmediateBlock Trusted Function

Function NameTRUSTED_TWrapS_Fee_EraseImmediateBlockTypeMinMaxUTP Tol.
Arguments PassedFunctionIndexTrustedFunctionIndexType
FunctionParamsTrustedFunctionParameterRefType
Return ValueN/A
Description

TWrapC_Fee_InvalidateBlock

This is the client (non-trusted) side of the Fee_InvalidateBlock Trusted Function

Function NameTWrapC_Fee_InvalidateBlockTypeMinMaxUTP Tol.
Arguments PassedBlockNumberuint16
Return Valuemyargs.TWrapS_Fee_InvalidateBlock_args_args.os_resultStd_ReturnType
Description

TRUSTED_TWrapS_Fee_InvalidateBlock

This is the server (trusted) side of the Fee_InvalidateBlock Trusted Function

Function NameTRUSTED_TWrapS_Fee_InvalidateBlockTypeMinMaxUTP Tol.
Arguments PassedFunctionIndexTrustedFunctionIndexType
FunctionParamsTrustedFunctionParameterRefType
Return ValueN/A
Description

TWrapC_Fee_Cancel

This is the client (non-trusted) side of the Fee_Cancel Trusted Function

Function NameTWrapC_Fee_CancelTypeMinMaxUTP Tol.
Arguments PassedNone
Return ValueN/A
Description

TRUSTED_TWrapS_Fee_Cancel

This is the server (trusted) side of the Fee_Cancel Trusted Function

Function NameTRUSTED_TWrapS_Fee_CancelTypeMinMaxUTP Tol.
Arguments PassedFunctionIndexTrustedFunctionIndexType
FunctionParamsTrustedFunctionParameterRefType
Return ValueN/A
Description

TWrapC_Fee_GetStatus

This is the client (non-trusted) side of the Fee_GetStatus Trusted Function

Function NameTWrapC_Fee_GetStatusTypeMinMaxUTP Tol.
Arguments PassedNone
Return Valuemyargs.TWrapS_Fee_GetStatus_args.os_resultuint8
Description

TRUSTED_TWrapS_Fee_GetStatus

This is the server (trusted) side of the Fee_GetStatus Trusted Function

Function NameTRUSTED_TWrapS_Fee_GetStatusTypeMinMaxUTP Tol.
Arguments PassedFunctionIndexTrustedFunctionIndexType
FunctionParamsTrustedFunctionParameterRefType
Return ValueN/A
Description

TWrapC_Fee_GetJobResult

This is the client (non-trusted) side of the Fee_GetJobResult Trusted Function

Function NameTWrapC_Fee_GetJobResultTypeMinMaxUTP Tol.
Arguments PassedNone
Return Valuemyargs.TWrapS_Fee_GetJobResult_args.os_resultuint8
Description

TRUSTED_TWrapS_Fee_GetJobResult

This is the server (trusted) side of the Fee_GetJobResult Trusted Function

Function NameTRUSTED_TWrapS_Fee_GetJobResultTypeMinMaxUTP Tol.
Arguments PassedFunctionIndexTrustedFunctionIndexType
FunctionParamsTrustedFunctionParameterRefType
Return ValueN/A
Description

TWrapC_TI_Fee_SuspendResumeErase

This is the client (non-trusted) side of the TI_Fee_SuspendResumeErase Trusted Function

Function NameTWrapC_TI_Fee_SuspendResumeEraseTypeMinMaxUTP Tol.
Arguments PassedCommanduint801
Return ValueN/A
Description

While the command type is a uint8, the actual type is TI_Fee_EraseCommandType.

TRUSTED_TWrapS_TI_Fee_SuspendResumeErase

This is the server (trusted) side of the TI_Fee_SuspendResumeErase Trusted Function

Function NameTRUSTED_TWrapS_TI_Fee_SuspendResumeEraseTypeMinMaxUTP Tol.
Arguments PassedFunctionIndexTrustedFunctionIndexType
FunctionParamsTrustedFunctionParameterRefType
Return ValueN/A
Description

Local Functions/Macros Used by this MDD only

Local Function #1

Function NameNoneTypeMinMaxUTP Tol.
Arguments Passed
Return Value

Description

N/A

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

Initialization Functions

(Note: For multiple init functions, insert new headers at the “Header 2” level – subset of “5.1 Initialization Functions” and follow the same sub-section design shown below)

Init: FeeIf_Init

Design Rationale

This function initializes the FEE driver. After the FEE BSW initialization, the Fee_MainFunction is required to be called until the FEE reports a status that is not busy. This is required because the NvM/MemIf BSWs currently make the assumption that the FEE driver will not be busy at initialization; however, the FEE driver may be busy if it has to finish any virtual sector swapping that may have been interrupted (i.e. the NvM currently can issue a new FEE command to the driver without first checking the FEE internal status the very first time after a new power cycle).

Module Outputs

None

Module Internal

None

Processing


Periodic Functions

None


Fault Recovery Functions

None


Shutdown Functions

None


Interrupt Functions

None


Serial Communication Functions

None


Execution Requirements

Execution Sequence of the Module

See Integration Manual

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

Execution Requirements for Serial Communication Functions

Function NameSub-Module called by (Serial Comm Function Name)
<None>


Memory Map Definition Requirements

Sub Modules (Functions)

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

Name of Sub ModuleSoftware Segment

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. FeeIf_Init currently does not implement any of the available error recovery mechanisms in the case of an issue with the FEE driver. Additionally, it doesn’t set any faults or report out any errors to the user if one of these FEE memory errors occur.

  2. For the provided trusted functions, there is currently neither checking on the passed parameters nor checking on the caller of the trusted function. It was unclear during the current design if either of these was necessary.

  3. This MDD is currently missing some datatype definition and ranges (specifically for the trusted function call wrappers). The assumption was that these would not need to be unit tested and were for design documentation only.


Revision Control Log

Item #Rev #Change DescriptionDateAuthor Initials
11Initial version07/15/13LWW
21.1.1Added suspend/resume erase functions11/04/14KJS
31.1.2Added FEE Single bit ECC correction12/15/14PS
43.1.1Updated FEE component and removed Nexteer FEE ECC workaround1/27/15PS
Last modified October 12, 2025: Initial commit (0347a62)