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.
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_getErrorOutMode (uint32_t baseAddr, esmOperationMode_t *pMode) |
This API is used to read Error Out mode (LVL or PWM) 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_PWML_setErrPinLowTimePreload (uint32_t baseAddr, uint32_t lowTime) |
This API is used to configure the low time counter pre-load value for PWM error. More... | |
int32_t | SDL_ESM_PWMH_setErrPinHighTimePreload (uint32_t baseAddr, uint32_t highTime) |
This API is used to configure the high time counter pre-load value for PWM error. 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_PWML_getErrPinLowTimePreload (uint32_t baseAddr, uint32_t *pPinPWMLCntrPre) |
This API is used to read the low time counter pre-load value for PWM error. More... | |
int32_t | SDL_ESM_PWMH_getErrPinHighTimePreload (uint32_t baseAddr, uint32_t *pPinPWMHCntrPre) |
This API is used to read the High time counter pre-load value for PWM error. 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_PWML_getCurrErrPinLowTimeCnt (uint32_t baseAddr, uint32_t *pLowPWMLTime) |
This API is used to get the current value of low time counter for PWM error. More... | |
int32_t | SDL_ESM_PWMH_getCurrErrPinHighTimeCnt (uint32_t baseAddr, uint32_t *pHighPWMHTime) |
This API is used to get the current value of high time counter for PWM error. 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 Error Output Mode type | |
typedef uint32_t | esmErrOutMode_t |
ESM Error Output Mode type. More... | |
#define | SDL_ESM_LVL_PINOUT 0x0U |
#define | SDL_ESM_PWM_PINOUT 0xFu |
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) |
#define ESM_NUMBER_OF_GROUP_REGS (32u) |
ESM Operation Mode type.
#define ESM_OPERATION_MODE_NORMAL 0x0U |
Configure ESM operation mode to normal mode
#define ESM_OPERATION_MODE_ERROR_FORCE 0xAu |
Configure ESM operation mode to error force mode
#define SDL_ESM_LVL_PINOUT 0x0U |
Configure ESM error output mode to LEVEL output
#define SDL_ESM_PWM_PINOUT 0xFu |
Configure ESM error output mode to PWM output
#define ESM_INTR_TYPE_CONFIG_ERROR (0x0u) |
Configure interrupt to high level interrupt
#define ESM_INTR_TYPE_LOW_PRIO_ERROR (0x1u) |
Configure interrupt to high level interrupt
#define ESM_INTR_TYPE_HIGH_PRIO_ERROR (0x2u) |
Configure interrupt to low level interrupt
#define ESM_INTR_PRIORITY_LEVEL_LOW (0x0u) |
Configure interrupt to low level interrupt
#define ESM_INTR_PRIORITY_LEVEL_HIGH (0x1u) |
Configure interrupt to high level interrupt
typedef uint32_t esmOperationMode_t |
ESM Operation Mode type.
typedef uint32_t esmErrOutMode_t |
ESM Error Output Mode type.
typedef uint32_t esmIntrType_t |
typedef uint32_t esmIntrPriorityLvl_t |
int32_t SDL_ESM_setMode | ( | uint32_t | baseAddr, |
esmOperationMode_t | mode | ||
) |
This API is used to configure operation mode of ESM module.
baseAddr | Base Address of the ESM Registers. |
mode | Channel number for which reset is to be done. Refer enum esmOperationMode_t. |
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);
int32_t SDL_ESM_getPinMode | ( | uint32_t | baseAddr, |
esmOperationMode_t * | pMode | ||
) |
This API is used to read operation mode of ESM module.
baseAddr | Base Address of the ESM Registers. |
pMode | pointer to variable to hold ESM operation Mode. Refer enum esmOperationMode_t. |
Example
uint32_t baseAddr = SDL_MCU_ESM0_CFG_BASE; esmOperationMode_t mode; uint32_t sdlRet; sdlRet = SDL_ESM_getPinMode (baseAddr, &mode);
int32_t SDL_ESM_getErrorOutMode | ( | uint32_t | baseAddr, |
esmOperationMode_t * | pMode | ||
) |
This API is used to read Error Out mode (LVL or PWM) of ESM module.
baseAddr | Base Address of the ESM Registers. |
pMode | pointer to variable to hold ESM ErrorOut Mode. Refer enum esmErrOutMode_t. |
Example
uint32_t baseAddr = SDL_MCU_ESM0_CFG_BASE; esmOperationMode_t mode; uint32_t sdlRet; sdlRet = SDL_ESM_getErrorOutMode (baseAddr, &mode);
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.
baseAddr | Base Address of the ESM Registers. |
intrSrc | Interrupt source which will influence nERROR pin. |
enable | true: Enables influence on nERROR pin if it is TRUE. false:Disables influence on nERROR pin if it is FALSE. |
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_setInfluenceOnErrPin (baseAddr, intrSrc, TRUE);
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.
baseAddr | Base Address of the ESM Registers. |
intrSrc | Interrupt source which will influence nERROR pin. |
pInfluence | pointer to read the influence value 1: enabled 0: disabled |
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; uint32_t influence; int32_t sdlRet; sdlRet = SDL_ESM_getInfluenceOnErrPin (baseAddr, intrSrc, &influence);
int32_t SDL_ESM_setErrPinLowTimePreload | ( | uint32_t | baseAddr, |
uint32_t | lowTime | ||
) |
This API is used to configure the low time counter pre-load value.
baseAddr | Base Address of the ESM Registers. |
lowTime | Time to be configured as LTCP. |
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.
Example
uint32_t baseAddr = SDL_MCU_ESM0_CFG_BASE; uint32_t pinCntrPre = 100; int32_t sdlRet; sdlRet = SDL_ESM_setErrPinLowTimePreload (baseAddr, pinCntrPre);
int32_t SDL_ESM_PWML_setErrPinLowTimePreload | ( | uint32_t | baseAddr, |
uint32_t | lowTime | ||
) |
This API is used to configure the low time counter pre-load value for PWM error.
baseAddr | Base Address of the ESM Registers. |
lowTime | Time to be configured as LTCP. |
This is the value that will be loaded in to the counter field of the Error Pin PWM low Counter Value Register whenever the error output pin toggles low.
Example
uint32_t baseAddr = SDL_MCU_ESM0_CFG_BASE; uint32_t pinCntrPre = 100; int32_t sdlRet; sdlRet = SDL_ESM_PWML_setErrPinLowTimePreload(baseAddr, pinCntrPre);
int32_t SDL_ESM_PWMH_setErrPinHighTimePreload | ( | uint32_t | baseAddr, |
uint32_t | highTime | ||
) |
This API is used to configure the high time counter pre-load value for PWM error.
baseAddr | Base Address of the ESM Registers. |
highTime | Time to be configured as HTCP. |
This is the value that will be loaded in to the counter field of the Error Pin PWM High Counter Value Register whenever the error output pin toggles high.
Example
uint32_t baseAddr = SDL_MCU_ESM0_CFG_BASE; uint32_t pinCntrPre = 100; int32_t sdlRet; sdlRet = SDL_ESM_PWMH_setErrPinHighTimePreload(baseAddr, pinCntrPre);
int32_t SDL_ESM_getErrPinLowTimePreload | ( | uint32_t | baseAddr, |
uint32_t * | pLowTime | ||
) |
This API is used to read the low time counter pre-load value.
baseAddr | Base Address of the ESM Registers. |
pLowTime | pointer to Time to be read as LTCP. |
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.
Example
uint32_t baseAddr = SDL_MCU_ESM0_CFG_BASE; uint32_t inCntrPre; int32_t sdlRet; sdlRet = SDL_ESM_getErrPinLowTimePreload (baseAddr, &inCntrPre);
int32_t SDL_ESM_PWML_getErrPinLowTimePreload | ( | uint32_t | baseAddr, |
uint32_t * | pPinPWMLCntrPre | ||
) |
This API is used to read the low time counter pre-load value for PWM error.
baseAddr | Base Address of the ESM Registers. |
pPinPWMLCntrPre | pointer to Time to be read as LTCP. |
This is the value that will be loaded in to the counter field of the Error Pin PWM Low Counter Value Register whenever the error output pin toggles low.
Example
uint32_t baseAddr = SDL_MCU_ESM0_CFG_BASE; uint32_t inCntrPre; int32_t sdlRet; sdlRet = SDL_ESM_PWML_getErrPinLowTimePreload(baseAddr, &inCntrPre);
int32_t SDL_ESM_PWMH_getErrPinHighTimePreload | ( | uint32_t | baseAddr, |
uint32_t * | pPinPWMHCntrPre | ||
) |
This API is used to read the High time counter pre-load value for PWM error.
baseAddr | Base Address of the ESM Registers. |
pPinPWMHCntrPre | pointer to Time to be read as HTCP. |
This is the value that will be loaded in to the counter field of the Error Pin PWM High Counter Value Register whenever the error output pin toggles high.
Example
uint32_t baseAddr = SDL_MCU_ESM0_CFG_BASE; uint32_t inCntrPre; int32_t sdlRet; sdlRet = SDL_ESM_PWMH_getErrPinHighTimePreload(baseAddr, inCntrPre);
int32_t SDL_ESM_getCurrErrPinLowTimeCnt | ( | uint32_t | baseAddr, |
uint32_t * | pPinCntrPre | ||
) |
This API is used to get the current value of low time counter.
baseAddr | Base Address of the ESM Registers. |
pPinCntrPre | pointer to Counter value Current low time count. |
Example
uint32_t baseAddr = SDL_MCU_ESM0_CFG_BASE; uint32_t pinCntrPre; int32_t sdlRet; sdlRet = SDL_ESM_getCurrErrPinLowTimeCnt (baseAddr, &pinCntrPre);
int32_t SDL_ESM_PWML_getCurrErrPinLowTimeCnt | ( | uint32_t | baseAddr, |
uint32_t * | pLowPWMLTime | ||
) |
This API is used to get the current value of low time counter for PWM error.
baseAddr | Base Address of the ESM Registers. |
pLowPWMLTime | pointer to Counter value Current low time count for PWM error. |
Example
uint32_t baseAddr = SDL_MCU_ESM0_CFG_BASE; uint32_t pinCntrPre; int32_t sdlRet; sdlRet = SDL_ESM_PWML_getCurrErrPinLowTimeCnt(baseAddr, &pinCntrPre);
int32_t SDL_ESM_PWMH_getCurrErrPinHighTimeCnt | ( | uint32_t | baseAddr, |
uint32_t * | pHighPWMHTime | ||
) |
This API is used to get the current value of high time counter for PWM error.
baseAddr | Base Address of the ESM Registers. |
pHighPWMHTime | pointer to Counter value Current high time count for PWM error. |
Example
uint32_t baseAddr = SDL_MCU_ESM0_CFG_BASE; uint32_t pinCntrPre; int32_t sdlRet; sdlRet = SDL_ESM_PWMH_getCurrErrPinHighTimeCnt(baseAddr, &pinCntrPre);
int32_t SDL_ESM_getErrPinStatus | ( | uint32_t | baseAddr, |
uint32_t * | pStatus | ||
) |
This API is used to get the current status of nERROR pin.
baseAddr | Base Address of the ESM Registers. |
pStatus | pointer to Current nERROR pin status. |
Example
uint32_t baseAddr = SDL_MCU_ESM0_CFG_BASE; uint32_t status; uint32_t sdlRet; sdlRet = SDL_ESM_getErrPinStatus (baseAddr, &status);
int32_t SDL_ESM_resetErrPin | ( | uint32_t | baseAddr | ) |
This API is used to reset the nERROR pin.
baseAddr | Base Address of the ESM Registers. |
Example
uint32_t baseAddr = SDL_MCU_ESM0_CFG_BASE; int32_t sdlRet; sdlRet = SDL_ESM_resetErrPin (baseAddr);
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.
baseAddr | Base Address of the ESM Registers. |
group | Group number for which to check if the interrupt is enabled. |
pEnStatus | Pointer to status of interrupt enable variable |
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_isEnableCfgIntr (baseAddr, group, &status);
int32_t SDL_ESM_isEnableIntr | ( | uint32_t | baseAddr, |
uint32_t | intrSrc, | ||
uint32_t * | pEnStatus | ||
) |
This API is used check if interrupt is enabled/disabled.
baseAddr | Base Address of the ESM Registers. |
intrSrc | Interrupt to enable. |
pEnStatus | Pointer to status of interrupt enable variable |
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, intrNum = 0u; int32_t sdlRet; sdlRet = SDL_ESM_isEnableIntr (baseAddr, intrNum, &status);
int32_t SDL_ESM_disableCfgIntr | ( | uint32_t | baseAddr, |
uint32_t | intrNum | ||
) |
This API is used to disable the configuration interrupt.
baseAddr | Base Address of the ESM Registers. |
intrNum | Interrupt Number to diable |
Example
uint32_t baseAddr = SDL_MCU_ESM0_CFG_BASE; uint32_t intrNum = 0u; int32_t sdlRet; sdlRet = SDL_ESM_disableCfgIntr (baseAddr, intrNum);
int32_t SDL_ESM_enableCfgIntr | ( | uint32_t | baseAddr, |
uint32_t | group | ||
) |
This API is used to enable the configuration interrupt.
baseAddr | Base Address of the ESM Registers. |
group | Group for which to enable configuration interrupt. |
Example
uint32_t baseAddr = SDL_MCU_ESM0_CFG_BASE; uint32_t group = 0u; int32_t status; status = SDL_ESM_enableCfgIntr (baseAddr, group);
int32_t SDL_ESM_enableIntr | ( | uint32_t | baseAddr, |
uint32_t | intrNum | ||
) |
This API is used to enable interrupt.
baseAddr | Base Address of the ESM Registers. |
intrNum | Interrupt to enable. |
Example
uint32_t baseAddr = SDL_MCU_ESM0_CFG_BASE; uint32_t intrNum = 0u; int32_t status; status = SDL_ESM_enableIntr (baseAddr, intrNum);
int32_t SDL_ESM_disableIntr | ( | uint32_t | baseAddr, |
uint32_t | intrNum | ||
) |
This API is used to disable interrupt.
baseAddr | Base Address of the ESM Registers. |
intrNum | Interrupt to disable. |
Example
uint32_t baseAddr = SDL_MCU_ESM0_CFG_BASE; uint32_t intrNum = 0u; int32_t sdlRet; sdlRet = SDL_ESM_setInfluenceOnErrPin (baseAddr, intrNum);
int32_t SDL_ESM_setIntrPriorityLvl | ( | uint32_t | baseAddr, |
uint32_t | intrSrc, | ||
esmIntrPriorityLvl_t | intrPriorityLvl | ||
) |
This API is used to set interrupt level.
baseAddr | Base Address of the ESM Registers. |
intrSrc | Interrupt to set the level. |
intrPriorityLvl | Interrupt level to set. Refer enum esmIntrPriorityLvl_t. |
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; esmIntrPriorityLvl_t pri = ESM_INTR_PRIORITY_LEVEL_HIGH; int32_t sdlRet; sdlRet = SDL_ESM_setIntrPriorityLvl (baseAddr, intrSrc, pri);
int32_t SDL_ESM_getIntrPriorityLvl | ( | uint32_t | baseAddr, |
uint32_t | intrSrc, | ||
esmIntrPriorityLvl_t * | pIntrPriorityLvl | ||
) |
This API is used to get interrupt level.
baseAddr | Base Address of the ESM Registers. |
intrSrc | Interrupt to set the level. |
pIntrPriorityLvl | Pointer to Interrupt level to get. Refer enum esmIntrPriorityLvl_t. |
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; esmIntrPriorityLvl_t pri; int32_t sdlRet; sdlRet = SDL_ESM_getIntrPriorityLvl (baseAddr, intrSrc, &pri);
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.
baseAddr | Base Address of the ESM Registers. |
group | Group for which status to return. |
pStaus | pointer to interrupt status |
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);
int32_t SDL_ESM_getIntrStatus | ( | uint32_t | baseAddr, |
uint32_t | intrSrc, | ||
uint32_t * | pStaus | ||
) |
This API is used to get the interrupt status.
baseAddr | Base Address of the ESM Registers. |
intrSrc | Interrupt for which status to return. |
pStaus | pointer to interrupt status |
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);
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.
baseAddr | Base Address of the ESM Registers. |
group | Group for which status to return. |
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);
int32_t SDL_ESM_setIntrStatusRAW | ( | uint32_t | baseAddr, |
uint32_t | intrSrc | ||
) |
This API is used to set the interrupt RAW status.
baseAddr | Base Address of the ESM Registers. |
intrSrc | Interrupt for which status to return. |
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);
int32_t SDL_ESM_getIntrStatusRAW | ( | uint32_t | baseAddr, |
uint32_t | intrSrc, | ||
uint32_t * | pStatus | ||
) |
This API is used to get the interrupt RAW status.
baseAddr | Base Address of the ESM Registers. |
intrSrc | Interrupt for which status to return. |
pStatus | pointer to Interrupt status. |
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);
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.
baseAddr | Base Address of the ESM Registers. |
intrPrioType | Group for which status to return. Refer enum esmIntrPriorityLvl_t. |
pIntrstatus | pointer to Interrupt status. Refer struct esmGroupIntrStatus_t. |
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);
int32_t SDL_ESM_clearCfgIntrStatus | ( | uint32_t | baseAddr, |
uint32_t | group | ||
) |
This API is used to clear the configuration interrupt status.
baseAddr | Base Address of the ESM Registers. |
group | Group for which to clear the configuration interrupt to clear status. |
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);
int32_t SDL_ESM_clearIntrStatus | ( | uint32_t | baseAddr, |
uint32_t | intrSrc | ||
) |
This API is used to clear the interrupt status.
baseAddr | Base Address of the ESM Registers. |
intrSrc | Interrupt to clear status. |
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);
int32_t SDL_ESM_writeEOI | ( | uint32_t | baseAddr, |
esmIntrType_t | intrType | ||
) |
This API is used to write EOI.
baseAddr | Base Address of the ESM Registers. |
intrType | Type of interrupt for which to write EOI. Refer enum esmIntrType_t. |
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);
int32_t SDL_ESM_getRevisionId | ( | uint32_t | baseAddr, |
esmRevisionId_t * | pRevId | ||
) |
This API is used get the ESM revision ID.
baseAddr | Base Address of the ESM Registers. |
pRevId | Pointer to Revision ID of ESM module.. Refer struct esmRevisionId_t. |
Example
uint32_t baseAddr = SDL_MCU_ESM0_CFG_BASE; esmRevisionId_t revId; int32_t sdlRet; sdlRet = ESMGetRevisionId (baseAddr, &revId);
int32_t SDL_ESM_getInfo | ( | uint32_t | baseAddr, |
esmInfo_t * | pInfo | ||
) |
This API is used read the ESM information register.
baseAddr | Base Address of the ESM Registers. |
pInfo | pointer to variable that Contains information register contents of ESM module.. Refer struct esmInfo_t. |
Example
uint32_t baseAddr = SDL_MCU_ESM0_CFG_BASE; esmInfo_t esmInfo; int32_t sdlRet; sdlRet = ESMGetInfo (baseAddr, &esmInfo);
int32_t SDL_ESM_getGlobalIntrEnabledStatus | ( | uint32_t | baseAddr, |
uint32_t * | pStatus | ||
) |
This API is used read the ESM information register.
baseAddr | Base Address of the ESM Registers. |
pStatus | pointer 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). |
Example
uint32_t baseAddr = SDL_MCU_ESM0_CFG_BASE; uint32_t enStatus; int32_t sdlRet; sdlRet = ESMGetGlobalIntrEnabledStatus (baseAddr, &enStatus);
int32_t SDL_ESM_enableGlobalIntr | ( | uint32_t | baseAddr | ) |
This API is used to enable Global control of interrupt.
baseAddr | Base Address of the ESM Registers. |
Example
uint32_t baseAddr = SDL_MCU_ESM0_CFG_BASE; int32_t sdlRet; sdlRet = ESMEnableGlobalIntr (baseAddr);
int32_t SDL_ESM_disableGlobalIntr | ( | uint32_t | baseAddr | ) |
This API is used to disable Global control of interrupt.
baseAddr | Base Address of the ESM Registers. |
Example
uint32_t baseAddr = SDL_MCU_ESM0_CFG_BASE; uint32_t sdlRet; sdlRet = ESMDisableGlobalIntr (baseAddr);
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.
baseAddr | Base Address of the ESM Registers. |
Example
uint32_t baseAddr = SDL_MCU_ESM0_CFG_BASE; uint32_t sdlRet; sdlRet = ESMReset (baseAddr);