PDK API Guide for J721E
esm.h File Reference

Introduction

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

Go to the source code of this file.

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  CSL_esmRegs_ERR_GRP_STATIC
 ESM Error Group static registers list. More...
 
struct  CSL_esmStaticRegs
 ESM static registers list. More...
 

Macros

#define ESM_NUMBER_OF_GROUP_REGS   (32u)
 ESM Operation Mode type. More...
 
#define ESM_OPERATION_MODE_NORMAL   0x0U
 defines to select the ESM Operation Mode. More...
 
#define ESM_OPERATION_MODE_ERROR_FORCE   0xAu
 
#define ESM_INTR_TYPE_CONFIG_ERROR   (0x0u)
 defines for ESM Hardware Requests for interrupt type. More...
 
#define ESM_INTR_TYPE_LOW_PRIO_ERROR   (0x1u)
 
#define ESM_INTR_TYPE_HIGH_PRIO_ERROR   (0x2u)
 
#define ESM_INTR_PRIORITY_LEVEL_LOW   (0x0u)
 defines to select level for interrupt. More...
 
#define ESM_INTR_PRIORITY_LEVEL_HIGH   (0x1u)
 

Typedefs

typedef uint32_t esmOperationMode_t
 ESM Operation Mode type. More...
 
typedef uint32_t esmIntrType_t
 ESM Interrupt Type to select level for interrupt. More...
 
typedef uint32_t esmIntrPriorityLvl_t
 ESM Interrupt Priority Levels. More...
 

Functions

int32_t ESMSetMode (uint32_t baseAddr, esmOperationMode_t mode)
 This API is used to configure operation mode of ESM module. More...
 
int32_t ESMGetMode (uint32_t baseAddr, esmOperationMode_t *pMode)
 This API is used to read operation mode of ESM module. More...
 
int32_t ESMSetInfluenceOnErrPin (uint32_t baseAddr, uint32_t intrSrc, bool enable)
 This API is used to set the influence of interrupt on nERROR pin. More...
 
int32_t ESMGetInfluenceOnErrPin (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 ESMSetErrPinLowTimePreload (uint32_t baseAddr, uint32_t lowTime)
 This API is used to configure the low time counter pre-load value. More...
 
int32_t ESMGetErrPinLowTimePreload (uint32_t baseAddr, uint32_t *pLowTime)
 This API is used to read the low time counter pre-load value. More...
 
int32_t ESMGetCurrErrPinLowTimeCnt (uint32_t baseAddr, uint32_t *pPinCntrPre)
 This API is used to get the current value of low time counter. More...
 
int32_t ESMGetErrPinStatus (uint32_t baseAddr, uint32_t *pStatus)
 This API is used to get the current status of nERROR pin. More...
 
int32_t ESMResetErrPin (uint32_t baseAddr)
 This API is used to reset the nERROR pin. More...
 
int32_t ESMIsEnableIntr (uint32_t baseAddr, uint32_t intrSrc, uint32_t *pEnStatus)
 This API is used check if interrupt is enabled/disabled. More...
 
int32_t ESMEnableIntr (uint32_t baseAddr, uint32_t intrNum)
 This API is used to enable interrupt. More...
 
int32_t ESMDisableIntr (uint32_t baseAddr, uint32_t intrNum)
 This API is used to disable interrupt. More...
 
int32_t ESMSetIntrPriorityLvl (uint32_t baseAddr, uint32_t intrSrc, esmIntrPriorityLvl_t intrPriorityLvl)
 This API is used to set interrupt level. More...
 
int32_t ESMGetIntrPriorityLvl (uint32_t baseAddr, uint32_t intrSrc, esmIntrPriorityLvl_t *pIntrPriorityLvl)
 This API is used to get interrupt level. More...
 
int32_t ESMGetIntrStatus (uint32_t baseAddr, uint32_t intrSrc, uint32_t *pStaus)
 This API is used to get the interrupt status. More...
 
int32_t ESMSetIntrStatusRAW (uint32_t baseAddr, uint32_t intrSrc)
 This API is used to set the interrupt RAW status. More...
 
int32_t ESMGetIntrStatusRAW (uint32_t baseAddr, uint32_t intrSrc, uint32_t *pStatus)
 This API is used to get the interrupt RAW status. More...
 
int32_t ESMGetGroupIntrStatus (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 ESMClearIntrStatus (uint32_t baseAddr, uint32_t intrSrc)
 This API is used to clear the interrupt status. More...
 
int32_t ESMWriteEOI (uint32_t baseAddr, esmIntrType_t intrType)
 This API is used to write EOI. More...
 
int32_t ESMGetRevisionId (uint32_t baseAddr, esmRevisionId_t *pRevId)
 This API is used get the ESM revision ID. More...
 
int32_t ESMGetInfo (uint32_t baseAddr, esmInfo_t *pInfo)
 This API is used read the ESM information register. More...
 
int32_t ESMGetGlobalIntrEnabledStatus (uint32_t baseAddr, uint32_t *pStatus)
 This API is used read the ESM information register. More...
 
int32_t ESMEnableGlobalIntr (uint32_t baseAddr)
 This API is used to enable Global control of interrupt. More...
 
int32_t ESMDisableGlobalIntr (uint32_t baseAddr)
 This API is used to disable Global control of interrupt. More...
 
int32_t ESMReset (uint32_t baseAddr)
 This API is used to reset ESM module. Reset is used to reset all enables and raw status bits. More...
 
int32_t ESMReadStaticRegs (uint32_t baseAddr, CSL_esmStaticRegs *pStaticRegs)
 This API is used to read static registers of ESM module. This API needs to be called after the initial configuration is done and hence mutliple read between static registers do not change the values. More...