AM273x MCU+ SDK  08.05.00
APIs for SDL ESM

Introduction

Sub Modules

 ESM Driver Error Codes
 
 ESM Low-Level API
 

Files

file  sdl_esm.h
 Header file contains enumerations, structure definitions and function declarations for SDL Error Signaling Module interface.
 

Data Structures

struct  ESM_GroupIntrStatus
 Structure to access the status of interrupts belonging to a group. More...
 
struct  SDL_ESM_ErrorConfig_t
 ESM error configuration. More...
 
struct  SDL_ESM_NotifyParams
 Parameters used to register the ESM notify function to handle Group1 and Group2 errors. The notify function will be invoked post the ESM FIQ interrupt handler processing. More...
 
struct  SDL_ESM_OpenParams
 ESM Open Parameters. More...
 
struct  SDL_ESM_Params
 ESM Hardware Attributes. More...
 
struct  SDL_ESM_Object
 ESM Module Object. More...
 
struct  SDL_ESM_Config
 ESM Instance configuration. More...
 

Functions

int32_t SDL_ESM_getNErrorStatus (SDL_ESM_Inst instance, uint32_t *pStatus)
 SDL ESM API to get the status of the nError pin for the specified ESM instance. More...
 
int32_t SDL_ESM_getStaticRegisters (SDL_ESM_Inst instance, SDL_ESM_staticRegs *pStaticRegs)
 SDL ESM API to read the static registers. The API reads and returns the static register configuration for the ESM module for the specified instance. This API can be used by the application to read back the static configuration. Comparision of the static configuration registers against expected values is the responsibility of the application. More...
 
int32_t SDL_ESM_clrNError (SDL_ESM_Inst instance)
 SDL ESM API to clear the nError pin for the specified ESM instance. More...
 
int32_t SDL_ESM_setNError (SDL_ESM_Inst instance)
 SDL ESM API to set the nError pin for the specified ESM instance. More...
 
SDL_Result SDL_ESM_init (const SDL_ESM_Inst esmInstType, SDL_ESM_NotifyParams *params, SDL_ESM_OpenParams *esmOpenParams, void *arg)
 SDL ESM API to initialize an ESM instance. The API initializes the specified ESM instance with the provided configuration. The configuration will allow the application to specify for each event whether the interrupt is enabled or disabled, the priority of the event, and whether the nErrorPin assertion is enabled or disabled for the event. More...
 
int32_t SDL_ESM_registerECCCallback (SDL_ESM_Inst esmInstType, uint32_t eccEvent, SDL_ESM_CallBack callBack, void *callbackArg)
 There are modules within SDL which will generate ESM errors intentionally in the course of running self-tests. The ECC module is one such module. To allow these modules to get the notification when the ESM error occurs, callback registration APIs are provided. The following APIs allow registration of a callback for specific events. This API is used by other SDL modules and not by the application. More...
 
int32_t SDL_ESM_verifyConfig (SDL_ESM_Inst instance, SDL_ESM_NotifyParams *params)
 SDL ESM API to verify the written configuration of the ESM module. The API verifies the written config that was done during SDL_ESM_init against the provided configuration. More...
 
static void SDL_ESM_Params_init (SDL_ESM_OpenParams *openPrms)
 

Typedefs

typedef int32_t SDL_Result
 
typedef int32_t(* SDL_ESM_CallBack) (SDL_ESM_Inst instance, int32_t grpChannel, int32_t vecNum, void *arg)
 Callback function which is invoked by the ESM module if a notify function is registered using the SDL_ESM_Init() API. More...
 

Enumerations

enum  SDL_ESM_IntType { SDL_ESM_INT_TYPE_HI = 1, SDL_ESM_INT_TYPE_LO = 2, SDL_ESM_INT_TYPE_CFG = 3, SDL_ESM_INT_TYPE_MAX = 4 }
 

Macros

#define SDL_ESM_ERRNO_BASE   (-3000)
 ESM Module error base. More...
 
#define SDL_ESM_INTNUMBER_INVALID   (0xffffffffu)
 Invalid interrupt number. More...
 
#define SDL_ESM_INST_INVALID   (0xfffffffeu)
 Invalid Esm Instance. More...
 
#define SDL_ESM_ERRORADDR_INVALID   (0xffffffffu)
 Address field: Error Address invalid. More...
 
#define SDL_ESM_ERRORRAMID_INVALID   (0xffffffffu)
 Address field: Error RAM ID invalid. More...
 
#define SDL_ESM_ERRORBITOFFSET_INVALID   (0xffffffffffffffffu)
 Address field: Error Bit Error Offset invalid. More...
 
#define SDL_ESM_ERRORBITGROUP_INVALID   (0xffffffffu)
 Address field: Error Bit Error Group invalid. More...
 
#define SDL_ESM_MAX_EVENT_MAP_NUM_WORDS   (32u)
 Maximum number of EVENT words. More...
 
#define SDL_ESM_MAX_NOTIFIERS   (256U)
 Maximum number of notify callbacks supported. More...
 
#define SDL_ESM_MAX_ISR_COUNT   (256U)
 Maximum ISR supported. More...
 
#define CONFIG_ESM0   (0U)
 

ESM ECC Error source type

typedef uint32_t sdlEsmEccErrorSource_t
 Source of the ECC error which maps to the ESM interrupt source. More...
 
#define SDL_ESM_ECC_PARAM_MCU_CPU0_SEC_ERROR   (1u)
 MCU CPU0 detected 1-bit ECC error source. More...
 
#define SDL_ESM_ECC_PARAM_MCU_CPU0_DED_ERROR   (2u)
 MCU CPU0 detected 2-bit ECC error source. More...
 
#define SDL_ESM_ECC_PARAM_MCU_CPU1_SEC_ERROR   (3u)
 MCU CPU1 detected 1-bit ECC error source. More...
 
#define SDL_ESM_ECC_PARAM_MCU_CPU1_DED_ERROR   (4u)
 MCU CPU1 detected 2-bit ECC error source. More...
 
#define SDL_ESM_ECC_PARAM_MCU_CBASS_SEC_ERROR   (5u)
 MCU CBASS detected 1-bit ECC error source. More...
 
#define SDL_ESM_ECC_PARAM_MCU_CBASS_DED_ERROR   (6u)
 MCU CBASS detected 2-bit ECC error source. More...
 

Macro Definition Documentation

◆ SDL_ESM_ERRNO_BASE

#define SDL_ESM_ERRNO_BASE   (-3000)

ESM Module error base.

◆ SDL_ESM_INTNUMBER_INVALID

#define SDL_ESM_INTNUMBER_INVALID   (0xffffffffu)

Invalid interrupt number.

◆ SDL_ESM_INST_INVALID

#define SDL_ESM_INST_INVALID   (0xfffffffeu)

Invalid Esm Instance.

◆ SDL_ESM_ERRORADDR_INVALID

#define SDL_ESM_ERRORADDR_INVALID   (0xffffffffu)

Address field: Error Address invalid.

◆ SDL_ESM_ERRORRAMID_INVALID

#define SDL_ESM_ERRORRAMID_INVALID   (0xffffffffu)

Address field: Error RAM ID invalid.

◆ SDL_ESM_ERRORBITOFFSET_INVALID

#define SDL_ESM_ERRORBITOFFSET_INVALID   (0xffffffffffffffffu)

Address field: Error Bit Error Offset invalid.

◆ SDL_ESM_ERRORBITGROUP_INVALID

#define SDL_ESM_ERRORBITGROUP_INVALID   (0xffffffffu)

Address field: Error Bit Error Group invalid.

◆ SDL_ESM_MAX_EVENT_MAP_NUM_WORDS

#define SDL_ESM_MAX_EVENT_MAP_NUM_WORDS   (32u)

Maximum number of EVENT words.

◆ SDL_ESM_MAX_NOTIFIERS

#define SDL_ESM_MAX_NOTIFIERS   (256U)

Maximum number of notify callbacks supported.

◆ SDL_ESM_MAX_ISR_COUNT

#define SDL_ESM_MAX_ISR_COUNT   (256U)

Maximum ISR supported.

◆ CONFIG_ESM0

#define CONFIG_ESM0   (0U)

◆ SDL_ESM_ECC_PARAM_MCU_CPU0_SEC_ERROR

#define SDL_ESM_ECC_PARAM_MCU_CPU0_SEC_ERROR   (1u)

MCU CPU0 detected 1-bit ECC error source.

◆ SDL_ESM_ECC_PARAM_MCU_CPU0_DED_ERROR

#define SDL_ESM_ECC_PARAM_MCU_CPU0_DED_ERROR   (2u)

MCU CPU0 detected 2-bit ECC error source.

◆ SDL_ESM_ECC_PARAM_MCU_CPU1_SEC_ERROR

#define SDL_ESM_ECC_PARAM_MCU_CPU1_SEC_ERROR   (3u)

MCU CPU1 detected 1-bit ECC error source.

◆ SDL_ESM_ECC_PARAM_MCU_CPU1_DED_ERROR

#define SDL_ESM_ECC_PARAM_MCU_CPU1_DED_ERROR   (4u)

MCU CPU1 detected 2-bit ECC error source.

◆ SDL_ESM_ECC_PARAM_MCU_CBASS_SEC_ERROR

#define SDL_ESM_ECC_PARAM_MCU_CBASS_SEC_ERROR   (5u)

MCU CBASS detected 1-bit ECC error source.

◆ SDL_ESM_ECC_PARAM_MCU_CBASS_DED_ERROR

#define SDL_ESM_ECC_PARAM_MCU_CBASS_DED_ERROR   (6u)

MCU CBASS detected 2-bit ECC error source.

Typedef Documentation

◆ SDL_Result

typedef int32_t SDL_Result

◆ sdlEsmEccErrorSource_t

typedef uint32_t sdlEsmEccErrorSource_t

Source of the ECC error which maps to the ESM interrupt source.

◆ SDL_ESM_CallBack

typedef int32_t(* SDL_ESM_CallBack) (SDL_ESM_Inst instance, int32_t grpChannel, int32_t vecNum, void *arg)

Callback function which is invoked by the ESM module if a notify function is registered using the SDL_ESM_Init() API.

Parameters
instance: ESM Instance
grpChannel: ESM group channel
vecNum: Interrupt vector number
arg: Argument passed back when the Notify function is invoked.
Return values
Notapplicable

Enumeration Type Documentation

◆ SDL_ESM_IntType


\brief This enumerator defines the values for ESM interrupt types

Enumerator
SDL_ESM_INT_TYPE_HI 

Interrupt type Hi

SDL_ESM_INT_TYPE_LO 

Interrupt type Lo

SDL_ESM_INT_TYPE_CFG 

Interrupt type Config

SDL_ESM_INT_TYPE_MAX 

Interrupt type Max

Function Documentation

◆ SDL_ESM_getNErrorStatus()

int32_t SDL_ESM_getNErrorStatus ( SDL_ESM_Inst  instance,
uint32_t *  pStatus 
)

SDL ESM API to get the status of the nError pin for the specified ESM instance.

============================================================================

Parameters
instanceESM Instance
pStatusPointer to variable to store the status. If status is 1, then error pin is not active. If status is 0, then error pin is active.
Returns
SDL_PASS if nError pin status is successfully retrieved. SDL_EBADARGS if instance or pStatus pointer are invalid. SDL_EFAIL if fail to read the error pin.

◆ SDL_ESM_getStaticRegisters()

int32_t SDL_ESM_getStaticRegisters ( SDL_ESM_Inst  instance,
SDL_ESM_staticRegs pStaticRegs 
)

SDL ESM API to read the static registers. The API reads and returns the static register configuration for the ESM module for the specified instance. This API can be used by the application to read back the static configuration. Comparision of the static configuration registers against expected values is the responsibility of the application.

============================================================================

Parameters
instanceESM Instance
pStaticRegsPointer to the static config register structure
Returns
SDL_PASS if registers are successfully read. SDL_EBADARGS if instance or pStaticRegs are invalid.

◆ SDL_ESM_clrNError()

int32_t SDL_ESM_clrNError ( SDL_ESM_Inst  instance)

SDL ESM API to clear the nError pin for the specified ESM instance.

============================================================================

Parameters
instanceESM Instance
Returns
SDL_PASS if nError pin status is successfully cleared. SDL_EBADARGS if instance is invalid.

◆ SDL_ESM_setNError()

int32_t SDL_ESM_setNError ( SDL_ESM_Inst  instance)

SDL ESM API to set the nError pin for the specified ESM instance.

============================================================================

Parameters
instanceESM Instance
Returns
SDL_PASS if nError pin status is successfully set. SDL_EBADARGS if instance is invalid.

◆ SDL_ESM_init()

SDL_Result SDL_ESM_init ( const SDL_ESM_Inst  esmInstType,
SDL_ESM_NotifyParams params,
SDL_ESM_OpenParams esmOpenParams,
void *  arg 
)

SDL ESM API to initialize an ESM instance. The API initializes the specified ESM instance with the provided configuration. The configuration will allow the application to specify for each event whether the interrupt is enabled or disabled, the priority of the event, and whether the nErrorPin assertion is enabled or disabled for the event.

============================================================================

Parameters
esmInstType: ESM Instance type
params: Pointer to an Notify parameter ,
esmOpenParams: Pointer to an parameter block, if NULL it will use default values.
arg: Application argument that will passed to the application when the application callback is called.
Returns
SDL_PASS if success. SDL_EBADARGS if invalid argument is passed. SDL_EFAIL if other failure.

◆ SDL_ESM_registerECCCallback()

int32_t SDL_ESM_registerECCCallback ( SDL_ESM_Inst  esmInstType,
uint32_t  eccEvent,
SDL_ESM_CallBack  callBack,
void *  callbackArg 
)

There are modules within SDL which will generate ESM errors intentionally in the course of running self-tests. The ECC module is one such module. To allow these modules to get the notification when the ESM error occurs, callback registration APIs are provided. The following APIs allow registration of a callback for specific events. This API is used by other SDL modules and not by the application.

============================================================================

Parameters
esmInstType: ESM Instance Type
eccEvent: Bitmap for ESM error event of interest for this callback. Array of uint32_t type with each bit representing one ESM error event.
callBack: Pointer to the callback to be called by the ESM Handler to notify the ECC module of an ESM error event
callbackArg: Argument that will be passed along with the callback.
Returns
SDL_PASS if success. SDL_EBADARGS if invalid argument is passed. SDL_EFAIL if other failure.

◆ SDL_ESM_verifyConfig()

int32_t SDL_ESM_verifyConfig ( SDL_ESM_Inst  instance,
SDL_ESM_NotifyParams params 
)

SDL ESM API to verify the written configuration of the ESM module. The API verifies the written config that was done during SDL_ESM_init against the provided configuration.

============================================================================

Parameters
instanceESM Instance
paramsPointer to the ESM configuration to be used for verification.
Returns
SDL_PASS if Verification passed SDL_EBADARGS if instance or pConfig are invalid. SDL_EFAIL if verification failed.

◆ SDL_ESM_Params_init()

static void SDL_ESM_Params_init ( SDL_ESM_OpenParams openPrms)
inlinestatic

Variable Documentation

◆ gEsmParams

SDL_ESM_Params gEsmParams[SDL_ESM_INST_DSS_ESM]
static
Initial value:
=
{
{
.ptrESMRegs = (SDL_esmRegs *)SDL_MSS_ESM_U_BASE,
.ptrCtrlRegs = (SDL_mss_ctrlRegs *)SDL_MSS_CTRL_U_BASE,
.numGroup1Err = SDL_ESM_NUM_INTR_PER_GROUP,
.highPrioIntNum = SDL_MSS_ESM_HI_INTNO,
.lowPrioIntNum = SDL_MSS_ESM_LOW_INTNO,
.intrHighPriority = SDL_ESM_EN_KEY_ENBALE_VAL,
.intrLowPriority = 8U,
},
{
.ptrESMRegs = (SDL_esmRegs *)SDL_DSS_ESM_U_BASE,
.ptrCtrlRegs = (SDL_mss_ctrlRegs *)SDL_DSS_CTRL_U_BASE,
.numGroup1Err = SDL_ESM_NUM_INTR_PER_GROUP,
.highPrioIntNum = SDL_DSS_ESM_HI_INTNO,
.lowPrioIntNum = SDL_DSS_ESM_LOW_INTNO,
.intrHighPriority = SDL_ESM_EN_KEY_ENBALE_VAL,
.intrLowPriority = 1U,
},
}

◆ gEsmObjects

SDL_ESM_Object gEsmObjects[CONFIG_ESM0]
static

◆ gEsmHandle

SDL_ESM_Handle gEsmHandle
extern

◆ gEsmConfig

SDL_ESM_Config gEsmConfig[SDL_ESM_INST_DSS_ESM]
static
Initial value:
=
{
{
&gEsmParams[SDL_ESM_INST_MSS_ESM -1U],
},
{
&gEsmParams[SDL_ESM_INST_DSS_ESM -1U],
},
}
SDL_ESM_NUM_INTR_PER_GROUP
#define SDL_ESM_NUM_INTR_PER_GROUP
Definition: sdl/esm/v1/esm.h:145
SDL_esmRegs
Definition: sdlr_esm.h:51
SDL_ESM_EN_KEY_ENBALE_VAL
#define SDL_ESM_EN_KEY_ENBALE_VAL
Definition: sdl/esm/v1/esm.h:85
gEsmObjects
static SDL_ESM_Object gEsmObjects[CONFIG_ESM0]
Definition: sdl_esm.h:333
CONFIG_ESM0
#define CONFIG_ESM0
Definition: sdl_esm.h:118
gEsmParams
static SDL_ESM_Params gEsmParams[SDL_ESM_INST_DSS_ESM]
Definition: sdl_esm.h:309