AM263x MCU+ SDK  08.05.00
ESM Low-Level API

Introduction

The Error Signaling Module (ESM) aggregates safety-related events and/or errors from throughout the device into one location. It can signal both low and high priority interrupts to a processor to deal with a safety event and/or manipulate an I/O error pin to signal an external hardware that an error has occurred. Therefore an external controller is able to reset the device or keep the system in a safe, known state.

The SDL APIs provide APIs to do the following functionalities.

  1. API to read back ESM registers
  2. API to set the ESM error forcing mode
  3. APIs for ESM initialization sequence/configurations
  4. APIs for ESM Raw error status

Files

file  esm.h
 This file contains the prototypes of the APIs present in the device abstraction layer file of ESM. This also contains some related macros.
 

Data Structures

struct  esmRevisionId_t
 Structure for accessing Revision ID of ESM module. More...
 
struct  esmInfo_t
 Structure for accessing information register of ESM module. More...
 
struct  esmGroupIntrStatus_t
 Structure to access the status of interrupts belonging to a High or Low priority interrupt. More...
 
struct  SDL_esmRegs_ERR_GRP_STATIC
 ESM Error Group static registers list. More...
 
struct  SDL_ESM_staticRegs
 ESM static registers list. More...
 

Functions

int32_t SDL_ESM_setMode (uint32_t baseAddr, esmOperationMode_t mode)
 This API is used to configure operation mode of ESM module. More...
 
int32_t SDL_ESM_getPinMode (uint32_t baseAddr, esmOperationMode_t *pMode)
 This API is used to read operation mode of ESM module. More...
 
int32_t SDL_ESM_setInfluenceOnErrPin (uint32_t baseAddr, uint32_t intrSrc, bool enable)
 This API is used to set the influence of interrupt on nERROR pin. More...
 
int32_t SDL_ESM_getInfluenceOnErrPin (uint32_t baseAddr, uint32_t intrSrc, uint32_t *pInfluence)
 This API is used to get the influence of interrupt on nERROR pin. More...
 
int32_t SDL_ESM_setErrPinLowTimePreload (uint32_t baseAddr, uint32_t lowTime)
 This API is used to configure the low time counter pre-load value. More...
 
int32_t SDL_ESM_getErrPinLowTimePreload (uint32_t baseAddr, uint32_t *pLowTime)
 This API is used to read the low time counter pre-load value. More...
 
int32_t SDL_ESM_getCurrErrPinLowTimeCnt (uint32_t baseAddr, uint32_t *pPinCntrPre)
 This API is used to get the current value of low time counter. More...
 
int32_t SDL_ESM_getErrPinStatus (uint32_t baseAddr, uint32_t *pStatus)
 This API is used to get the current status of nERROR pin. More...
 
int32_t SDL_ESM_resetErrPin (uint32_t baseAddr)
 This API is used to reset the nERROR pin. More...
 
int32_t SDL_ESM_isEnableCfgIntr (uint32_t baseAddr, uint32_t group, uint32_t *pEnStatus)
 This API is used check if the configuration interrupt for a group is enabled/disabled. More...
 
int32_t SDL_ESM_isEnableIntr (uint32_t baseAddr, uint32_t intrSrc, uint32_t *pEnStatus)
 This API is used check if interrupt is enabled/disabled. More...
 
int32_t SDL_ESM_disableCfgIntr (uint32_t baseAddr, uint32_t intrNum)
 This API is used to disable the configuration interrupt. More...
 
int32_t SDL_ESM_enableCfgIntr (uint32_t baseAddr, uint32_t group)
 This API is used to enable the configuration interrupt. More...
 
int32_t SDL_ESM_enableIntr (uint32_t baseAddr, uint32_t intrNum)
 This API is used to enable interrupt. More...
 
int32_t SDL_ESM_disableIntr (uint32_t baseAddr, uint32_t intrNum)
 This API is used to disable interrupt. More...
 
int32_t SDL_ESM_setIntrPriorityLvl (uint32_t baseAddr, uint32_t intrSrc, esmIntrPriorityLvl_t intrPriorityLvl)
 This API is used to set interrupt level. More...
 
int32_t SDL_ESM_getIntrPriorityLvl (uint32_t baseAddr, uint32_t intrSrc, esmIntrPriorityLvl_t *pIntrPriorityLvl)
 This API is used to get interrupt level. More...
 
int32_t SDL_ESM_getCfgIntrStatus (uint32_t baseAddr, uint32_t group, uint32_t *pStaus)
 This API is used to get the configuration interrupt status for a group. More...
 
int32_t SDL_ESM_getIntrStatus (uint32_t baseAddr, uint32_t intrSrc, uint32_t *pStaus)
 This API is used to get the interrupt status. More...
 
int32_t SDL_ESM_setCfgIntrStatusRAW (uint32_t baseAddr, uint32_t group)
 This API is used to set the configuration interrupt RAW status for a group. More...
 
int32_t SDL_ESM_setIntrStatusRAW (uint32_t baseAddr, uint32_t intrSrc)
 This API is used to set the interrupt RAW status. More...
 
int32_t SDL_ESM_getIntrStatusRAW (uint32_t baseAddr, uint32_t intrSrc, uint32_t *pStatus)
 This API is used to get the interrupt RAW status. More...
 
int32_t SDL_ESM_getGroupIntrStatus (uint32_t baseAddr, esmIntrPriorityLvl_t intrPrioType, esmGroupIntrStatus_t *pIntrstatus)
 This API is used to get the interrupt/error status for a group. This will also return highest pending interrupt for pulse as well as for level interrupts. More...
 
int32_t SDL_ESM_clearCfgIntrStatus (uint32_t baseAddr, uint32_t group)
 This API is used to clear the configuration interrupt status. More...
 
int32_t SDL_ESM_clearIntrStatus (uint32_t baseAddr, uint32_t intrSrc)
 This API is used to clear the interrupt status. More...
 
int32_t SDL_ESM_writeEOI (uint32_t baseAddr, esmIntrType_t intrType)
 This API is used to write EOI. More...
 
int32_t SDL_ESM_getRevisionId (uint32_t baseAddr, esmRevisionId_t *pRevId)
 This API is used get the ESM revision ID. More...
 
int32_t SDL_ESM_getInfo (uint32_t baseAddr, esmInfo_t *pInfo)
 This API is used read the ESM information register. More...
 
int32_t SDL_ESM_getGlobalIntrEnabledStatus (uint32_t baseAddr, uint32_t *pStatus)
 This API is used read the ESM information register. More...
 
int32_t SDL_ESM_enableGlobalIntr (uint32_t baseAddr)
 This API is used to enable Global control of interrupt. More...
 
int32_t SDL_ESM_disableGlobalIntr (uint32_t baseAddr)
 This API is used to disable Global control of interrupt. More...
 
int32_t SDL_ESM_reset (uint32_t baseAddr)
 This API is used to reset ESM module. Reset is used to reset all enables and raw status bits. More...
 

Macros

#define ESM_NUMBER_OF_GROUP_REGS   (32u)
 ESM Operation Mode type. More...
 

ESM Operation Mode type

typedef uint32_t esmOperationMode_t
 ESM Operation Mode type. More...
 
#define ESM_OPERATION_MODE_NORMAL   0x0U
 
#define ESM_OPERATION_MODE_ERROR_FORCE   0xAu
 

ESM Interrupt Type to select level for interrupt.

typedef uint32_t esmIntrType_t
 
#define ESM_INTR_TYPE_CONFIG_ERROR   (0x0u)
 
#define ESM_INTR_TYPE_LOW_PRIO_ERROR   (0x1u)
 
#define ESM_INTR_TYPE_HIGH_PRIO_ERROR   (0x2u)
 

ESM Interrupt Priority Levels

typedef uint32_t esmIntrPriorityLvl_t
 
#define ESM_INTR_PRIORITY_LEVEL_LOW   (0x0u)
 
#define ESM_INTR_PRIORITY_LEVEL_HIGH   (0x1u)
 

Macro Definition Documentation

◆ ESM_NUMBER_OF_GROUP_REGS

#define ESM_NUMBER_OF_GROUP_REGS   (32u)

ESM Operation Mode type.

◆ ESM_OPERATION_MODE_NORMAL

#define ESM_OPERATION_MODE_NORMAL   0x0U

Configure ESM operation mode to normal mode

◆ ESM_OPERATION_MODE_ERROR_FORCE

#define ESM_OPERATION_MODE_ERROR_FORCE   0xAu

Configure ESM operation mode to error force mode

◆ ESM_INTR_TYPE_CONFIG_ERROR

#define ESM_INTR_TYPE_CONFIG_ERROR   (0x0u)

Configure interrupt to high level interrupt

◆ ESM_INTR_TYPE_LOW_PRIO_ERROR

#define ESM_INTR_TYPE_LOW_PRIO_ERROR   (0x1u)

Configure interrupt to high level interrupt

◆ ESM_INTR_TYPE_HIGH_PRIO_ERROR

#define ESM_INTR_TYPE_HIGH_PRIO_ERROR   (0x2u)

Configure interrupt to low level interrupt

◆ ESM_INTR_PRIORITY_LEVEL_LOW

#define ESM_INTR_PRIORITY_LEVEL_LOW   (0x0u)

Configure interrupt to low level interrupt

◆ ESM_INTR_PRIORITY_LEVEL_HIGH

#define ESM_INTR_PRIORITY_LEVEL_HIGH   (0x1u)

Configure interrupt to high level interrupt

Typedef Documentation

◆ esmOperationMode_t

typedef uint32_t esmOperationMode_t

ESM Operation Mode type.

◆ esmIntrType_t

typedef uint32_t esmIntrType_t

◆ esmIntrPriorityLvl_t

typedef uint32_t esmIntrPriorityLvl_t

Function Documentation

◆ SDL_ESM_setMode()

int32_t SDL_ESM_setMode ( uint32_t  baseAddr,
esmOperationMode_t  mode 
)

This API is used to configure operation mode of ESM module.

Parameters
baseAddrBase Address of the ESM Registers.
modeChannel number for which reset is to be done. Refer enum esmOperationMode_t.
Returns
SDL_PASS - API success
SDL_EBADARGS - API fails due to bad input arguments
Precondition

ESM module is reset and initialized for desired operation
Postcondition

None

Example

    uint32_t            baseAddr = SDL_MCU_ESM0_CFG_BASE;
    esmOperationMode_t  mode     = ESM_OPERATION_MODE_ERROR_FORCE;
    int32_t             sdlRet;

    sdlRet = SDL_ESM_setMode (baseAddr, mode);

◆ SDL_ESM_getPinMode()

int32_t SDL_ESM_getPinMode ( uint32_t  baseAddr,
esmOperationMode_t pMode 
)

This API is used to read operation mode of ESM module.

Parameters
baseAddrBase Address of the ESM Registers.
pModepointer to variable to hold ESM operation Mode. Refer enum esmOperationMode_t.
Returns
SDL_PASS - API success
SDL_EBADARGS - API fails due to bad input arguments
Precondition

ESM module is reset and initialized for desired operation
Postcondition

None

Example

    uint32_t            baseAddr = SDL_MCU_ESM0_CFG_BASE;
    esmOperationMode_t  mode;
    uint32_t            sdlRet;

    sdlRet = SDL_ESM_getPinMode (baseAddr, &mode);

◆ SDL_ESM_setInfluenceOnErrPin()

int32_t SDL_ESM_setInfluenceOnErrPin ( uint32_t  baseAddr,
uint32_t  intrSrc,
bool  enable 
)

This API is used to set the influence of interrupt on nERROR pin.

Parameters
baseAddrBase Address of the ESM Registers.
intrSrcInterrupt source which will influence nERROR pin.
enabletrue: Enables influence on nERROR pin if it is TRUE. false:Disables influence on nERROR pin if it is FALSE.
Returns
SDL_PASS - success
SDL_EBADARGS - API fails due to bad input arguments

Note: the intrSrc check is only at the IP level max and not done at instance level, so it is expected to be done at higher layer.

Precondition

ESM module is reset and initialized for desired operation
Postcondition

None

Example

    uint32_t            baseAddr = SDL_MCU_ESM0_CFG_BASE;
    uint32_t            intrSrc  = SDL_ESM1_INTR_MCU0_CPU0_ECC_CORRECTED_LEVEL;
    int32_t             sdlRet;
    sdlRet =  SDL_ESM_setInfluenceOnErrPin (baseAddr, intrSrc, TRUE);

◆ SDL_ESM_getInfluenceOnErrPin()

int32_t SDL_ESM_getInfluenceOnErrPin ( uint32_t  baseAddr,
uint32_t  intrSrc,
uint32_t *  pInfluence 
)

This API is used to get the influence of interrupt on nERROR pin.

Parameters
baseAddrBase Address of the ESM Registers.
intrSrcInterrupt source which will influence nERROR pin.
pInfluencepointer to read the influence value 1: enabled 0: disabled
Returns
SDL_PASS - success
SDL_EBADARGS - API fails due to bad input arguments

Note: the intrSrc check is only at the IP level max and not done at instance level, so it is expected to be done at higher layer.

Precondition

ESM module is reset and initialized for desired operation
Postcondition

None

Example

    uint32_t            baseAddr = SDL_MCU_ESM0_CFG_BASE;
    uint32_t            intrSrc  = SDL_ESM1_INTR_MCU0_CPU0_ECC_CORRECTED_LEVEL;
    uint32_t            influence;
    int32_t             sdlRet;
    sdlRet =  SDL_ESM_getInfluenceOnErrPin (baseAddr, intrSrc, &influence);

◆ SDL_ESM_setErrPinLowTimePreload()

int32_t SDL_ESM_setErrPinLowTimePreload ( uint32_t  baseAddr,
uint32_t  lowTime 
)

This API is used to configure the low time counter pre-load value.

Parameters
baseAddrBase Address of the ESM Registers.
lowTimeTime to be configured as LTCP.
Returns
SDL_PASS - success
SDL_EBADARGS - API fails due to bad input arguments
Precondition

ESM module is reset and initialized for desired operation

This is the value that will be pre-loaded in to the counter field of the ESM_PIN_CNTR register whenever the ESM enters the ESM_ERROR state from ESM_IDLE. The default value is determined based on the ESM clock frequency, so that there is a minimum low time of 100 micro seconds. This field is only reset by a Power-On-Reset (not warm reset). A global soft reset will set this field to 0h.

Postcondition

None

Example

    uint32_t            baseAddr = SDL_MCU_ESM0_CFG_BASE;
    uint32_t            pinCntrPre  = 100;
    int32_t             sdlRet;
    sdlRet = SDL_ESM_setErrPinLowTimePreload (baseAddr, pinCntrPre);

◆ SDL_ESM_getErrPinLowTimePreload()

int32_t SDL_ESM_getErrPinLowTimePreload ( uint32_t  baseAddr,
uint32_t *  pLowTime 
)

This API is used to read the low time counter pre-load value.

Parameters
baseAddrBase Address of the ESM Registers.
pLowTimepointer to Time to be read as LTCP.
Returns
SDL_PASS - success
SDL_EBADARGS - API fails due to bad input arguments
Precondition

ESM module is reset and initialized for desired operation

This is the value that will be pre-loaded in to the counter field of the ESM_PIN_CNTR register whenever the ESM enters the ESM_ERROR state from ESM_IDLE. The default value is determined based on the ESM clock frequency, so that there is a minimum low time of 100 micro seconds. This field is only reset by a Power-On-Reset (not warm reset). A global soft reset will set this field to 0h.

Postcondition

None

Example

    uint32_t            baseAddr = SDL_MCU_ESM0_CFG_BASE;
    uint32_t            inCntrPre;
    int32_t             sdlRet;
    sdlRet = SDL_ESM_getErrPinLowTimePreload (baseAddr, &inCntrPre);

◆ SDL_ESM_getCurrErrPinLowTimeCnt()

int32_t SDL_ESM_getCurrErrPinLowTimeCnt ( uint32_t  baseAddr,
uint32_t *  pPinCntrPre 
)

This API is used to get the current value of low time counter.

Parameters
baseAddrBase Address of the ESM Registers.
pPinCntrPrepointer to Counter value Current low time count.
Returns
SDL_PASS - success
SDL_EBADARGS - API fails due to bad input arguments
Precondition

ESM module is reset and initialized for desired operation
Postcondition

None

Example

    uint32_t            baseAddr = SDL_MCU_ESM0_CFG_BASE;
    uint32_t            pinCntrPre;
    int32_t             sdlRet;
    sdlRet  = SDL_ESM_getCurrErrPinLowTimeCnt (baseAddr, &pinCntrPre);

◆ SDL_ESM_getErrPinStatus()

int32_t SDL_ESM_getErrPinStatus ( uint32_t  baseAddr,
uint32_t *  pStatus 
)

This API is used to get the current status of nERROR pin.

Parameters
baseAddrBase Address of the ESM Registers.
pStatuspointer to Current nERROR pin status.
Returns
SDL_PASS - success
SDL_EBADARGS - API fails due to bad input arguments
Precondition

ESM module is reset and initialized for desired operation
Postcondition

None

Example

    uint32_t            baseAddr = SDL_MCU_ESM0_CFG_BASE;
    uint32_t            status;
    uint32_t            sdlRet;
    sdlRet = SDL_ESM_getErrPinStatus (baseAddr, &status);

◆ SDL_ESM_resetErrPin()

int32_t SDL_ESM_resetErrPin ( uint32_t  baseAddr)

This API is used to reset the nERROR pin.

Parameters
baseAddrBase Address of the ESM Registers.
Returns
SDL_PASS - success
SDL_EBADARGS - API fails due to bad input arguments
Note
This will set the nERROR pin to high.
Precondition

ESM module is reset and initialized for desired operation
Postcondition

None

Example

    uint32_t            baseAddr = SDL_MCU_ESM0_CFG_BASE;
    int32_t             sdlRet;
    sdlRet = SDL_ESM_resetErrPin (baseAddr);

◆ SDL_ESM_isEnableCfgIntr()

int32_t SDL_ESM_isEnableCfgIntr ( uint32_t  baseAddr,
uint32_t  group,
uint32_t *  pEnStatus 
)

This API is used check if the configuration interrupt for a group is enabled/disabled.

Parameters
baseAddrBase Address of the ESM Registers.
groupGroup number for which to check if the interrupt is enabled.
pEnStatusPointer to status of interrupt enable variable
Returns
SDL_PASS - success
SDL_EBADARGS - API fails due to bad input arguments
Precondition

ESM module is reset and initialized for desired operation

Note: the group check is only at the IP level max and not done at instance level, so it is expected to be done at higher layer.

Postcondition

None

Example

    uint32_t            baseAddr = SDL_MCU_ESM0_CFG_BASE;
    uint32_t            status, group = 0u;
    int32_t             sdlRet;
    sdlRet = SDL_ESM_isEnableCfgIntr (baseAddr, group, &status);

◆ SDL_ESM_isEnableIntr()

int32_t SDL_ESM_isEnableIntr ( uint32_t  baseAddr,
uint32_t  intrSrc,
uint32_t *  pEnStatus 
)

This API is used check if interrupt is enabled/disabled.

Parameters
baseAddrBase Address of the ESM Registers.
intrSrcInterrupt to enable.
pEnStatusPointer to status of interrupt enable variable
Returns
SDL_PASS - success
SDL_EBADARGS - API fails due to bad input arguments
Precondition

ESM module is reset and initialized for desired operation

Note: the intrSrc check is only at the IP level max and not done at instance level, so it is expected to be done at higher layer.

Postcondition

None

Example

    uint32_t            baseAddr = SDL_MCU_ESM0_CFG_BASE;
    uint32_t            status, intrNum  = 0u;
    int32_t             sdlRet;
    sdlRet = SDL_ESM_isEnableIntr (baseAddr, intrNum, &status);

◆ SDL_ESM_disableCfgIntr()

int32_t SDL_ESM_disableCfgIntr ( uint32_t  baseAddr,
uint32_t  intrNum 
)

This API is used to disable the configuration interrupt.

Parameters
baseAddrBase Address of the ESM Registers.
intrNumInterrupt Number to diable
Returns
SDL_PASS - success
SDL_EBADARGS - API fails due to bad input arguments
Precondition

None
Postcondition

None

Example

    uint32_t            baseAddr = SDL_MCU_ESM0_CFG_BASE;
    uint32_t            intrNum = 0u;
    int32_t             sdlRet;
    sdlRet = SDL_ESM_disableCfgIntr (baseAddr, intrNum);

◆ SDL_ESM_enableCfgIntr()

int32_t SDL_ESM_enableCfgIntr ( uint32_t  baseAddr,
uint32_t  group 
)

This API is used to enable the configuration interrupt.

Parameters
baseAddrBase Address of the ESM Registers.
groupGroup for which to enable configuration interrupt.
Returns
SDL_PASS - success
SDL_EBADARGS - API fails due to bad input arguments
Precondition

ESM module is reset and initialized for desired operation
Postcondition

None

Example

    uint32_t            baseAddr = SDL_MCU_ESM0_CFG_BASE;
    uint32_t            group = 0u;
    int32_t             status;
    status = SDL_ESM_enableCfgIntr (baseAddr, group);

◆ SDL_ESM_enableIntr()

int32_t SDL_ESM_enableIntr ( uint32_t  baseAddr,
uint32_t  intrNum 
)

This API is used to enable interrupt.

Parameters
baseAddrBase Address of the ESM Registers.
intrNumInterrupt to enable.
Returns
SDL_PASS - success
SDL_EBADARGS - API fails due to bad input arguments
Precondition

ESM module is reset and initialized for desired operation
Postcondition

None

Example

    uint32_t            baseAddr = SDL_MCU_ESM0_CFG_BASE;
    uint32_t            intrNum  = 0u;
    int32_t             status;
    status = SDL_ESM_enableIntr (baseAddr, intrNum);

◆ SDL_ESM_disableIntr()

int32_t SDL_ESM_disableIntr ( uint32_t  baseAddr,
uint32_t  intrNum 
)

This API is used to disable interrupt.

Parameters
baseAddrBase Address of the ESM Registers.
intrNumInterrupt to disable.
Returns
SDL_PASS - success
SDL_EBADARGS - API fails due to bad input arguments
Precondition

None
Postcondition

None

Example

    uint32_t            baseAddr = SDL_MCU_ESM0_CFG_BASE;
    uint32_t            intrNum  = 0u;
    int32_t             sdlRet;
    sdlRet = SDL_ESM_setInfluenceOnErrPin (baseAddr, intrNum);

◆ SDL_ESM_setIntrPriorityLvl()

int32_t SDL_ESM_setIntrPriorityLvl ( uint32_t  baseAddr,
uint32_t  intrSrc,
esmIntrPriorityLvl_t  intrPriorityLvl 
)

This API is used to set interrupt level.

Parameters
baseAddrBase Address of the ESM Registers.
intrSrcInterrupt to set the level.
intrPriorityLvlInterrupt level to set. Refer enum esmIntrPriorityLvl_t.
Returns
SDL_PASS - success
SDL_EBADARGS - API fails due to bad input arguments
Precondition

ESM module is reset and initialized for desired operation

Note: the intrSrc check is only at the IP level max and not done at instance level, so it is expected to be done at higher layer.

Postcondition

None

Example

    uint32_t            baseAddr = SDL_MCU_ESM0_CFG_BASE;
    uint32_t            intrSrc  = SDL_ESM1_INTR_MCU0_CPU0_ECC_CORRECTED_LEVEL;
    esmIntrPriorityLvl_t pri     = ESM_INTR_PRIORITY_LEVEL_HIGH;
    int32_t             sdlRet;
    sdlRet = SDL_ESM_setIntrPriorityLvl (baseAddr, intrSrc, pri);

◆ SDL_ESM_getIntrPriorityLvl()

int32_t SDL_ESM_getIntrPriorityLvl ( uint32_t  baseAddr,
uint32_t  intrSrc,
esmIntrPriorityLvl_t pIntrPriorityLvl 
)

This API is used to get interrupt level.

Parameters
baseAddrBase Address of the ESM Registers.
intrSrcInterrupt to set the level.
pIntrPriorityLvlPointer to Interrupt level to get. Refer enum esmIntrPriorityLvl_t.
Returns
SDL_PASS - success
SDL_EBADARGS - API fails due to bad input arguments

Note: the intrSrc check is only at the IP level max and not done at instance level, so it is expected to be done at higher layer.

Precondition

ESM module is reset and initialized for desired operation
Postcondition

None

Example

    uint32_t            baseAddr = SDL_MCU_ESM0_CFG_BASE;
    uint32_t            intrSrc  = SDL_ESM1_INTR_MCU0_CPU0_ECC_CORRECTED_LEVEL;
    esmIntrPriorityLvl_t            pri;
    int32_t             sdlRet;
    sdlRet = SDL_ESM_getIntrPriorityLvl (baseAddr, intrSrc, &pri);

◆ SDL_ESM_getCfgIntrStatus()

int32_t SDL_ESM_getCfgIntrStatus ( uint32_t  baseAddr,
uint32_t  group,
uint32_t *  pStaus 
)

This API is used to get the configuration interrupt status for a group.

Parameters
baseAddrBase Address of the ESM Registers.
groupGroup for which status to return.
pStauspointer to interrupt status
Returns
SDL_PASS - success
SDL_EBADARGS - API fails due to bad input arguments
Precondition

ESM module is reset and initialized for desired operation
Postcondition

None

Note: the group check is only at the IP level max and not done at instance level, so it is expected to be done at higher layer.

Example

    uint32_t            baseAddr = SDL_MCU_ESM0_CFG_BASE;
    uint32_t            status, group = 0u;
    int32_t             sdlRet;
    sdlRet = SDL_ESM_getCfgIntrStatus (baseAddr, group, &status);

◆ SDL_ESM_getIntrStatus()

int32_t SDL_ESM_getIntrStatus ( uint32_t  baseAddr,
uint32_t  intrSrc,
uint32_t *  pStaus 
)

This API is used to get the interrupt status.

Parameters
baseAddrBase Address of the ESM Registers.
intrSrcInterrupt for which status to return.
pStauspointer to interrupt status
Returns
SDL_PASS - success
SDL_EBADARGS - API fails due to bad input arguments
Precondition

ESM module is reset and initialized for desired operation
Postcondition

None

Note: the intrSrc check is only at the IP level max and not done at instance level, so it is expected to be done at higher layer.

Example

    uint32_t            baseAddr = SDL_MCU_ESM0_CFG_BASE;
    uint32_t            status, intrSrc  = SDL_ESM1_INTR_MCU0_CPU0_ECC_CORRECTED_LEVEL;
    int32_t             sdlRet;
    sdlRet = SDL_ESM_getIntrStatus (baseAddr, intrSrc, &status);

◆ SDL_ESM_setCfgIntrStatusRAW()

int32_t SDL_ESM_setCfgIntrStatusRAW ( uint32_t  baseAddr,
uint32_t  group 
)

This API is used to set the configuration interrupt RAW status for a group.

Parameters
baseAddrBase Address of the ESM Registers.
groupGroup for which status to return.
Returns
SDL_PASS - success
SDL_EBADARGS - API fails due to bad input arguments
Precondition

ESM module is reset and initialized for desired operation
Postcondition

None

Note: the group check is only at the IP level max and not done at instance level, so it is expected to be done at higher layer.

Example

    uint32_t            baseAddr = SDL_MCU_ESM0_CFG_BASE;
    uint32_t            group = 0u;
    int32_t             sdlRet;
    sdlRet = SDL_ESM_setCfgIntrStatusRAW (baseAddr, group);

◆ SDL_ESM_setIntrStatusRAW()

int32_t SDL_ESM_setIntrStatusRAW ( uint32_t  baseAddr,
uint32_t  intrSrc 
)

This API is used to set the interrupt RAW status.

Parameters
baseAddrBase Address of the ESM Registers.
intrSrcInterrupt for which status to return.
Returns
SDL_PASS - success
SDL_EBADARGS - API fails due to bad input arguments
Precondition

ESM module is reset and initialized for desired operation
Postcondition

None

Note: the intrSrc check is only at the IP level max and not done at instance level, so it is expected to be done at higher layer.

Example

    uint32_t            baseAddr = SDL_MCU_ESM0_CFG_BASE;
    uint32_t            intrSrc  = SDL_ESM1_INTR_MCU0_CPU0_ECC_CORRECTED_LEVEL;
    int32_t             sdlRet;
    sdlRet = SDL_ESM_setIntrStatusRAW (baseAddr, intrSrc);

◆ SDL_ESM_getIntrStatusRAW()

int32_t SDL_ESM_getIntrStatusRAW ( uint32_t  baseAddr,
uint32_t  intrSrc,
uint32_t *  pStatus 
)

This API is used to get the interrupt RAW status.

Parameters
baseAddrBase Address of the ESM Registers.
intrSrcInterrupt for which status to return.
pStatuspointer to Interrupt status.
Returns
SDL_PASS - success
SDL_EBADARGS - API fails due to bad input arguments
Precondition

ESM module is reset and initialized for desired operation
Postcondition

None

Note: the intrSrc check is only at the IP level max and not done at instance level, so it is expected to be done at higher layer.

Example

    uint32_t            baseAddr = SDL_MCU_ESM0_CFG_BASE;
    uint32_t            intrSrc  = SDL_ESM1_INTR_MCU0_CPU0_ECC_CORRECTED_LEVEL;
    uitn32_t            status;
    int32_t             sdlRet;
    sdlRet = SDL_ESM_getIntrStatusRAW (baseAddr, intrSrc, &status);

◆ SDL_ESM_getGroupIntrStatus()

int32_t SDL_ESM_getGroupIntrStatus ( uint32_t  baseAddr,
esmIntrPriorityLvl_t  intrPrioType,
esmGroupIntrStatus_t pIntrstatus 
)

This API is used to get the interrupt/error status for a group. This will also return highest pending interrupt for pulse as well as for level interrupts.

Parameters
baseAddrBase Address of the ESM Registers.
intrPrioTypeGroup for which status to return. Refer enum esmIntrPriorityLvl_t.
pIntrstatuspointer to Interrupt status. Refer struct esmGroupIntrStatus_t.
Returns
SDL_PASS - success
SDL_EBADARGS - API fails due to bad input arguments
Precondition

ESM module is reset and initialized for desired operation
Postcondition

None

Example

    uint32_t            baseAddr = SDL_MCU_ESM0_CFG_BASE;
    esmIntrPriorityLvl  priType  = ESM_INTR_PRIORITY_LEVEL_HIGH;
    esmGroupIntrStatus_t groupIntrStatus;
    int32_t             sdlRet;

    sdlRet = SDL_ESM_getGroupIntrStatus (baseAddr, priType, &groupIntrStatus);

◆ SDL_ESM_clearCfgIntrStatus()

int32_t SDL_ESM_clearCfgIntrStatus ( uint32_t  baseAddr,
uint32_t  group 
)

This API is used to clear the configuration interrupt status.

Parameters
baseAddrBase Address of the ESM Registers.
groupGroup for which to clear the configuration interrupt to clear status.
Returns
SDL_PASS - success
SDL_EBADARGS - API fails due to bad input arguments
Precondition

ESM module is reset and initialized for desired operation
Postcondition

None

Note: the group check is only at the IP level max and not done at instance level, so it is expected to be done at higher layer.

Example

    uint32_t            baseAddr = SDL_MCU_ESM0_CFG_BASE;
    uint32_t            group = 0u;
    int32_t             sdlRet;
    sdlRet = SDL_ESM_clearCfgIntrStatus (baseAddr, group);

◆ SDL_ESM_clearIntrStatus()

int32_t SDL_ESM_clearIntrStatus ( uint32_t  baseAddr,
uint32_t  intrSrc 
)

This API is used to clear the interrupt status.

Parameters
baseAddrBase Address of the ESM Registers.
intrSrcInterrupt to clear status.
Returns
SDL_PASS - success
SDL_EBADARGS - API fails due to bad input arguments
Precondition

ESM module is reset and initialized for desired operation
Postcondition

None

Note: the intrSrc check is only at the IP level max and not done at instance level, so it is expected to be done at higher layer.

Example

    uint32_t            baseAddr = SDL_MCU_ESM0_CFG_BASE;
    uint32_t            intrSrc  = SDL_ESM1_INTR_MCU0_CPU0_ECC_CORRECTED_LEVEL;
    int32_t             sdlRet;
    sdlRet = SDL_ESM_clearIntrStatus (baseAddr, intrSrc);

◆ SDL_ESM_writeEOI()

int32_t SDL_ESM_writeEOI ( uint32_t  baseAddr,
esmIntrType_t  intrType 
)

This API is used to write EOI.

Parameters
baseAddrBase Address of the ESM Registers.
intrTypeType of interrupt for which to write EOI. Refer enum esmIntrType_t.
Returns
SDL_PASS - success
SDL_EBADARGS - API fails due to bad input arguments
Precondition

ESM module is reset and initialized for desired operation
Postcondition

None

Example

    uint32_t            baseAddr = SDL_MCU_ESM0_CFG_BASE;
    esmIntrType_t       intrType  = ESM_INTR_TYPE_HIGH_PRIO_ERROR;
    int32_t             sdlRet;
    sdlRet = SDL_ESM_writeEOI (baseAddr, intrType);

◆ SDL_ESM_getRevisionId()

int32_t SDL_ESM_getRevisionId ( uint32_t  baseAddr,
esmRevisionId_t pRevId 
)

This API is used get the ESM revision ID.

Parameters
baseAddrBase Address of the ESM Registers.
pRevIdPointer to Revision ID of ESM module.. Refer struct esmRevisionId_t.
Returns
SDL_PASS - success
SDL_EBADARGS - API fails due to bad input arguments
Precondition

ESM module is reset and initialized for desired operation
Postcondition

None

Example

    uint32_t            baseAddr = SDL_MCU_ESM0_CFG_BASE;
    esmRevisionId_t     revId;
    int32_t             sdlRet;
    sdlRet = ESMGetRevisionId (baseAddr, &revId);

◆ SDL_ESM_getInfo()

int32_t SDL_ESM_getInfo ( uint32_t  baseAddr,
esmInfo_t pInfo 
)

This API is used read the ESM information register.

Parameters
baseAddrBase Address of the ESM Registers.
pInfopointer to variable that Contains information register contents of ESM module.. Refer struct esmInfo_t.
Returns
SDL_PASS - success
SDL_EBADARGS - API fails due to bad input arguments
Precondition

None
Postcondition

None

Example

    uint32_t            baseAddr = SDL_MCU_ESM0_CFG_BASE;
    esmInfo_t           esmInfo;
    int32_t             sdlRet;
    sdlRet = ESMGetInfo (baseAddr, &esmInfo);

◆ SDL_ESM_getGlobalIntrEnabledStatus()

int32_t SDL_ESM_getGlobalIntrEnabledStatus ( uint32_t  baseAddr,
uint32_t *  pStatus 
)

This API is used read the ESM information register.

Parameters
baseAddrBase Address of the ESM Registers.
pStatuspointer to is global Interrupt enabled status 0h: all interrupts are enabled Fh: all interrupts are disabled -others: interrupts are in invalid state.Software should never write these values. If these values are ever read, they indicate that an error has occurred. In this state, all interrupts are enabled (biased to false enable).
Returns
SDL_PASS - success
SDL_EBADARGS - API fails due to bad input arguments
Precondition

None
Postcondition

None

Example

    uint32_t            baseAddr = SDL_MCU_ESM0_CFG_BASE;
    uint32_t            enStatus;
    int32_t             sdlRet;
    sdlRet = ESMGetGlobalIntrEnabledStatus (baseAddr, &enStatus);

◆ SDL_ESM_enableGlobalIntr()

int32_t SDL_ESM_enableGlobalIntr ( uint32_t  baseAddr)

This API is used to enable Global control of interrupt.

Parameters
baseAddrBase Address of the ESM Registers.
Returns
SDL_PASS - success
SDL_EBADARGS - API fails due to bad input arguments
Precondition

ESM module is reset and initialized for desired operation
Postcondition

None

Example

    uint32_t            baseAddr = SDL_MCU_ESM0_CFG_BASE;
    int32_t             sdlRet;
    sdlRet = ESMEnableGlobalIntr (baseAddr);

◆ SDL_ESM_disableGlobalIntr()

int32_t SDL_ESM_disableGlobalIntr ( uint32_t  baseAddr)

This API is used to disable Global control of interrupt.

Parameters
baseAddrBase Address of the ESM Registers.
Returns
SDL_PASS - success
SDL_EBADARGS - API fails due to bad input arguments
Precondition

ESM module is reset and initialized for desired operation
Postcondition

None

Example

    uint32_t            baseAddr = SDL_MCU_ESM0_CFG_BASE;
    uint32_t            sdlRet;
    sdlRet = ESMDisableGlobalIntr (baseAddr);

◆ SDL_ESM_reset()

int32_t SDL_ESM_reset ( uint32_t  baseAddr)

This API is used to reset ESM module. Reset is used to reset all enables and raw status bits.

Parameters
baseAddrBase Address of the ESM Registers.
Returns
SDL_PASS - success
SDL_EBADARGS - API fails due to bad input arguments
Precondition

None
Postcondition

None

Example

    uint32_t            baseAddr = SDL_MCU_ESM0_CFG_BASE;
    uint32_t            sdlRet;
    sdlRet = ESMReset (baseAddr);