AM273x 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  sdl/esm/v1/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  SDL_ESM_GroupIntrStatus
 Structure to access the status of interrupts belonging to a High or Low priority interrupt. 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_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_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_getIntrStatus (uint32_t baseAddr, uint32_t intrSrc, uint32_t *pStaus)
 This API is used to get the interrupt status. More...
 
int32_t SDL_ESM_getGroupIntrStatus (uint32_t baseAddr, esmIntrPriorityLvl_t intrPrioType, SDL_ESM_GroupIntrStatus *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_clearIntrStatus (uint32_t baseAddr, uint32_t intrSrc)
 This API is used to clear the interrupt status. More...
 
int32_t SDL_ESM_clearGroupIntrStatus (uint32_t baseAddr, uint32_t grpNum)
 This API is used to clear 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_getLowPriorityLvlIntrStatus (uint32_t baseAddr, uint32_t *pstatus)
 This API is used to get the low priority level interrupt status. More...
 
int32_t SDL_ESM_getHighPriorityLvlIntrStatus (uint32_t baseAddr, uint32_t *pstatus)
 This API is used to get the High priority level interrupt status. More...
 
int32_t SDL_ESM_getIntrPriorityLvl (uint32_t baseAddr, uint32_t intrSrc, esmIntrPriorityLvl_t *pIntrPriorityLvl)
 This API is used to get interrupt level. More...
 

Typedefs

typedef void * SDL_ESM_Handle
 A handle that is returned from a ESM_Init() call. More...
 

Macros

#define BITS_PER_WORD   (32u)
 
#define BITS_PER_WORD   (32u)
 
#define ESM_INTR_GRP_NUM   (32U)
 
#define GROUP_NUMBER_BIT_SHIFT   (5u)
 
#define NO_EVENT_VALUE   (0xffffu)
 
#define SDL_ESM_EN_KEY_ENBALE_VAL   (0xFU)
 
#define INVALID_BIT   (0u)
 
#define FLAG_NO   (0u)
 
#define FLAG_YES   (1u)
 
#define ESM_NUM_INTR_PER_GRP   (32U)
 
#define ESM_MAX_NUM_INTRS   (1024U)
 
#define ESM_ESM_PIN_CTRL_KEY_RESET_VAL   (0x5U)
 
#define ESM_SFT_RST_KEY_RESET_VAL   (0xFU)
 
#define ESM_EN_KEY_MASK   (0xFU)
 
#define ESM_EN_KEY_ENBALE_VAL   (0xFU)
 
#define ESM_EN_KEY_DISABLE_VAL   (0x0U)
 
#define SDL_ESM_ESMIEPSR(m)
 Get ESM enable error pin action/response register offset. More...
 
#define SDL_ESM_ESMIEPCR(m)
 Get ESM disable error pin action/response register offset. More...
 
#define SDL_ESM_ESMIESR(m)
 Get ESM interrupt enable set/status register offset. More...
 
#define SDL_ESM_ESMIECR(m)
 Get ESM interrupt enable clear/status register offset. More...
 
#define SDL_ESM_ESMILSR(m)
 Get ESM interrupt level set/status register offset. More...
 
#define SDL_ESM_ESMILCR(m)
 Get ESM interrupt level clear/status register offset. More...
 
#define SDL_ESM_ESMSR(m)
 Get ESM status register offset. More...
 
#define SDL_ESM_ESMSR_NUM_ELEMS   (4U)
 Maximum number of elements. More...
 
#define ESM_GATING_MASK   (0xFU)
 ESM gating operation related definitions. More...
 
#define ESM_GATING_SHIFT   (0x4U)
 4-bit Shift from one ESM event to the next one More...
 
#define ESM_NUM_EVTS_PER_GATING_REG   (0x8U)
 Each ESM_GATING register handles 8 ESM events. More...
 
#define ESM_GATING_GROUP   (0x4U)
 4 ESM_GATING registers for group 2, followed by the registers for group 3 More...
 
#define ESM_NUMBER_OF_GROUP_REGS   (32u)
 ESM Operation Mode type. More...
 
#define SDL_ESM_NUM_GROUP_MAX   (3U)
 ESM number of groups. More...
 
#define SDL_ESM_NUM_INTR_PER_GROUP   (128U)
 

ESM Operation Mode type

typedef uint32_t esmOperationMode_t
 ESM Operation Mode type. More...
 
#define SDL_ESM_OPERATION_MODE_NORMAL   0x0U
 
#define SDL_ESM_OPERATION_MODE_ERROR_FORCE   0xAu
 

ESM Interrupt Type to select level for interrupt.

typedef uint32_t esmIntrType_t
 
#define SDL_ESM_INTR_TYPE_LOW_PRIO_ERROR   (0x1u)
 
#define SDL_ESM_INTR_TYPE_HIGH_PRIO_ERROR   (0x2u)
 

ESM Interrupt Priority Levels

typedef uint32_t esmIntrPriorityLvl_t
 
#define SDL_ESM_INTR_PRIORITY_LEVEL_LOW   (0x0u)
 
#define SDL_ESM_INTR_PRIORITY_LEVEL_HIGH   (0x1u)
 

Macro Definition Documentation

◆ BITS_PER_WORD [1/2]

#define BITS_PER_WORD   (32u)

◆ BITS_PER_WORD [2/2]

#define BITS_PER_WORD   (32u)

◆ ESM_INTR_GRP_NUM

#define ESM_INTR_GRP_NUM   (32U)

◆ GROUP_NUMBER_BIT_SHIFT

#define GROUP_NUMBER_BIT_SHIFT   (5u)

◆ NO_EVENT_VALUE

#define NO_EVENT_VALUE   (0xffffu)

◆ SDL_ESM_EN_KEY_ENBALE_VAL

#define SDL_ESM_EN_KEY_ENBALE_VAL   (0xFU)

◆ INVALID_BIT

#define INVALID_BIT   (0u)

◆ FLAG_NO

#define FLAG_NO   (0u)

◆ FLAG_YES

#define FLAG_YES   (1u)

◆ ESM_NUM_INTR_PER_GRP

#define ESM_NUM_INTR_PER_GRP   (32U)

◆ ESM_MAX_NUM_INTRS

#define ESM_MAX_NUM_INTRS   (1024U)

◆ ESM_ESM_PIN_CTRL_KEY_RESET_VAL

#define ESM_ESM_PIN_CTRL_KEY_RESET_VAL   (0x5U)

◆ ESM_SFT_RST_KEY_RESET_VAL

#define ESM_SFT_RST_KEY_RESET_VAL   (0xFU)

◆ ESM_EN_KEY_MASK

#define ESM_EN_KEY_MASK   (0xFU)

◆ ESM_EN_KEY_ENBALE_VAL

#define ESM_EN_KEY_ENBALE_VAL   (0xFU)

◆ ESM_EN_KEY_DISABLE_VAL

#define ESM_EN_KEY_DISABLE_VAL   (0x0U)

◆ SDL_ESM_ESMIEPSR

#define SDL_ESM_ESMIEPSR (   m)
Value:
((uint32_t) ESM_ESMIEPSR1 + \
(((m) / 32U) * 0x40U))

Get ESM enable error pin action/response register offset.

◆ SDL_ESM_ESMIEPCR

#define SDL_ESM_ESMIEPCR (   m)
Value:
((uint32_t) ESM_ESMIEPCR1 + \
(((m) / 32U) * 0x40U))

Get ESM disable error pin action/response register offset.

◆ SDL_ESM_ESMIESR

#define SDL_ESM_ESMIESR (   m)
Value:
((uint32_t) ESM_ESMIESR1 + \
(((m) / 32U) * 0x40U))

Get ESM interrupt enable set/status register offset.

◆ SDL_ESM_ESMIECR

#define SDL_ESM_ESMIECR (   m)
Value:
((uint32_t) ESM_ESMIECR1 + \
(((m) / 32U) * 0x40U))

Get ESM interrupt enable clear/status register offset.

◆ SDL_ESM_ESMILSR

#define SDL_ESM_ESMILSR (   m)
Value:
((uint32_t) ESM_ESMILSR1 + \
(((m) / 32U) * 0x40U))

Get ESM interrupt level set/status register offset.

◆ SDL_ESM_ESMILCR

#define SDL_ESM_ESMILCR (   m)
Value:
((uint32_t) ESM_ESMILCR1 + \
(((m) / 32U) * 0x40U))

Get ESM interrupt level clear/status register offset.

◆ SDL_ESM_ESMSR

#define SDL_ESM_ESMSR (   m)
Value:
((uint32_t) ESM_ESMSR1 + \
(((m) / 32U) * 0x40U))

Get ESM status register offset.

◆ SDL_ESM_ESMSR_NUM_ELEMS

#define SDL_ESM_ESMSR_NUM_ELEMS   (4U)

Maximum number of elements.

◆ ESM_GATING_MASK

#define ESM_GATING_MASK   (0xFU)

ESM gating operation related definitions.

Four bits are used for each ESM event, creating a mask of 0xF

◆ ESM_GATING_SHIFT

#define ESM_GATING_SHIFT   (0x4U)

4-bit Shift from one ESM event to the next one

◆ ESM_NUM_EVTS_PER_GATING_REG

#define ESM_NUM_EVTS_PER_GATING_REG   (0x8U)

Each ESM_GATING register handles 8 ESM events.

◆ ESM_GATING_GROUP

#define ESM_GATING_GROUP   (0x4U)

4 ESM_GATING registers for group 2, followed by the registers for group 3

◆ ESM_NUMBER_OF_GROUP_REGS

#define ESM_NUMBER_OF_GROUP_REGS   (32u)

ESM Operation Mode type.

◆ SDL_ESM_NUM_GROUP_MAX

#define SDL_ESM_NUM_GROUP_MAX   (3U)

ESM number of groups.

◆ SDL_ESM_NUM_INTR_PER_GROUP

#define SDL_ESM_NUM_INTR_PER_GROUP   (128U)

◆ SDL_ESM_OPERATION_MODE_NORMAL

#define SDL_ESM_OPERATION_MODE_NORMAL   0x0U

Configure ESM operation mode to normal mode

◆ SDL_ESM_OPERATION_MODE_ERROR_FORCE

#define SDL_ESM_OPERATION_MODE_ERROR_FORCE   0xAu

Configure ESM operation mode to error force mode

◆ SDL_ESM_INTR_TYPE_LOW_PRIO_ERROR

#define SDL_ESM_INTR_TYPE_LOW_PRIO_ERROR   (0x1u)

Configure interrupt to high level interrupt

◆ SDL_ESM_INTR_TYPE_HIGH_PRIO_ERROR

#define SDL_ESM_INTR_TYPE_HIGH_PRIO_ERROR   (0x2u)

Configure interrupt to low level interrupt

◆ SDL_ESM_INTR_PRIORITY_LEVEL_LOW

#define SDL_ESM_INTR_PRIORITY_LEVEL_LOW   (0x0u)

Configure interrupt to low level interrupt

◆ SDL_ESM_INTR_PRIORITY_LEVEL_HIGH

#define SDL_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

◆ SDL_ESM_Handle

typedef void* SDL_ESM_Handle

A handle that is returned from a ESM_Init() call.

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     = SDL_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_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_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_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_getGroupIntrStatus()

int32_t SDL_ESM_getGroupIntrStatus ( uint32_t  baseAddr,
esmIntrPriorityLvl_t  intrPrioType,
SDL_ESM_GroupIntrStatus 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 SDL_ESM_GroupIntrStatus.
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;
    SDL_ESM_GroupIntrStatus groupIntrStatus;
    int32_t             sdlRet;

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

◆ 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_clearGroupIntrStatus()

int32_t SDL_ESM_clearGroupIntrStatus ( uint32_t  baseAddr,
uint32_t  grpNum 
)

This API is used to clear 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.
grpNumGroup for which status to return. 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
Postcondition

None

Example

    uint32_t            baseAddr = SDL_MCU_ESM0_CFG_BASE;
    uint32_t            grpNum  = GROUP_ONE;
    int32_t             sdlRet;

    sdlRet = SDL_ESM_clearGroupIntrStatus (baseAddr, grpNum);

◆ SDL_ESM_getLowPriorityLvlIntrStatus()

int32_t SDL_ESM_getLowPriorityLvlIntrStatus ( uint32_t  baseAddr,
uint32_t *  pstatus 
)

This API is used to get the low priority level interrupt status.

Parameters
baseAddrBase Address of the ESM Registers.
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            status;
    int32_t             sdlRet;
    sdlRet = SDL_ESM_getLowPriorityLvlIntrStatus (baseAddr, &status);

◆ SDL_ESM_getHighPriorityLvlIntrStatus()

int32_t SDL_ESM_getHighPriorityLvlIntrStatus ( uint32_t  baseAddr,
uint32_t *  pstatus 
)

This API is used to get the High priority level interrupt status.

Parameters
baseAddrBase Address of the ESM Registers.
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            status;
    int32_t             sdlRet;
    sdlRet = SDL_ESM_getHighPriorityLvlIntrStatus (baseAddr, &status);

◆ 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);
ESM_ESMIEPSR1
#define ESM_ESMIEPSR1
Definition: sdlr_esm.h:508
ESM_ESMIEPCR1
#define ESM_ESMIEPCR1
Definition: sdlr_esm.h:509
ESM_ESMILSR1
#define ESM_ESMILSR1
Definition: sdlr_esm.h:512
ESM_ESMSR1
#define ESM_ESMSR1
Definition: sdlr_esm.h:514
ESM_ESMIECR1
#define ESM_ESMIECR1
Definition: sdlr_esm.h:511
ESM_ESMILCR1
#define ESM_ESMILCR1
Definition: sdlr_esm.h:513
ESM_ESMIESR1
#define ESM_ESMIESR1
Definition: sdlr_esm.h:510