AM273x MCU+ SDK  09.02.00
sdl/esm/v1/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.

ESM Operation Mode type

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

ESM Interrupt Type to select level for interrupt.

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

ESM Interrupt Priority Levels

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

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...
 

Macros

#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 BITS_PER_WORD   (32u)
 
#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)
 

Typedefs

typedef void * SDL_ESM_Handle
 A handle that is returned from a ESM_Init() call. 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...