PDK API Guide for J721E

Introduction

===========================================================================

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

Function Documentation

◆ ESMSetMode()

int32_t ESMSetMode ( 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
CSL_PASS - API success
CSL_EBADARGS - API fails due to bad input arguments
Precondition

ESM module is reset and initialized for desired operation
Postcondition

None

Example

    uint32_t            baseAddr = CSL_MCU_ESM0_CFG_BASE;
    esmOperationMode_t  mode     = ESM_OPERATION_MODE_ERROR_FORCE;
    int32_t             cslRet;

    cslRet = ESMSetMode (baseAddr, mode);

◆ ESMGetMode()

int32_t ESMGetMode ( 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
CSL_PASS - API success
CSL_EBADARGS - API fails due to bad input arguments
Precondition

ESM module is reset and initialized for desired operation
Postcondition

None

Example

    uint32_t            baseAddr = CSL_MCU_ESM0_CFG_BASE;
    esmOperationMode_t  mode;
    uint32_t            cslRet;

    cslRet = ESMGetMode (baseAddr, &mode);

◆ ESMSetInfluenceOnErrPin()

int32_t ESMSetInfluenceOnErrPin ( 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
CSL_PASS - success
CSL_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 = CSL_MCU_ESM0_CFG_BASE;
    uint32_t            intrSrc  = CSL_ESM1_INTR_MCU0_CPU0_ECC_CORRECTED_LEVEL;
    int32_t             cslRet;
    cslRet =  ESMSetInfluenceOnErrPin (baseAddr, intrSrc, TRUE);

◆ ESMGetInfluenceOnErrPin()

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.

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
CSL_PASS - success
CSL_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 = CSL_MCU_ESM0_CFG_BASE;
    uint32_t            intrSrc  = CSL_ESM1_INTR_MCU0_CPU0_ECC_CORRECTED_LEVEL;
    uint32_t            influence;
    int32_t             cslRet;
    cslRet =  ESMGetInfluenceOnErrPin (baseAddr, intrSrc, &influence);

◆ ESMSetErrPinLowTimePreload()

int32_t ESMSetErrPinLowTimePreload ( 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
CSL_PASS - success
CSL_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 = CSL_MCU_ESM0_CFG_BASE;
    uint32_t            pinCntrPre  = 100;
    int32_t             cslRet;
    cslRet = ESMSetErrPinLowTimePreload (baseAddr, pinCntrPre);

◆ ESMGetErrPinLowTimePreload()

int32_t ESMGetErrPinLowTimePreload ( 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
CSL_PASS - success
CSL_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 = CSL_MCU_ESM0_CFG_BASE;
    uint32_t            inCntrPre;
    int32_t             cslRet;
    cslRet = ESMGetErrPinLowTimePreload (baseAddr, &inCntrPre);

◆ ESMGetCurrErrPinLowTimeCnt()

int32_t ESMGetCurrErrPinLowTimeCnt ( 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
CSL_PASS - success
CSL_EBADARGS - API fails due to bad input arguments
Precondition

ESM module is reset and initialized for desired operation
Postcondition

None

Example

    uint32_t            baseAddr = CSL_MCU_ESM0_CFG_BASE;
    uint32_t            pinCntrPre;
    int32_t             cslRet;
    cslRet  = ESMGetCurrErrPinLowTimeCnt (baseAddr, &pinCntrPre);

◆ ESMGetErrPinStatus()

int32_t ESMGetErrPinStatus ( 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
CSL_PASS - success
CSL_EBADARGS - API fails due to bad input arguments
Precondition

ESM module is reset and initialized for desired operation
Postcondition

None

Example

    uint32_t            baseAddr = CSL_MCU_ESM0_CFG_BASE;
    uint32_t            status;
    uint32_t            cslRet;
    cslRet = ESMGetErrPinStatus (baseAddr, &status);

◆ ESMResetErrPin()

int32_t ESMResetErrPin ( uint32_t  baseAddr)

This API is used to reset the nERROR pin.

Parameters
baseAddrBase Address of the ESM Registers.
Returns
CSL_PASS - success
CSL_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 = CSL_MCU_ESM0_CFG_BASE;
    int32_t             cslRet;
    cslRet = ESMResetErrPin (baseAddr);

◆ ESMIsEnableIntr()

int32_t ESMIsEnableIntr ( 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
CSL_PASS - success
CSL_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 = CSL_MCU_ESM0_CFG_BASE;
    uint32_t            status, intrNum  = 0u;
    int32_t             cslRet;
    cslRet = ESMIsEnableIntr (baseAddr, intrNum, &status);

◆ ESMEnableIntr()

int32_t ESMEnableIntr ( uint32_t  baseAddr,
uint32_t  intrNum 
)

This API is used to enable interrupt.

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

ESM module is reset and initialized for desired operation
Postcondition

None

Example

    uint32_t            baseAddr = CSL_MCU_ESM0_CFG_BASE;
    uint32_t            intrNum  = 0u;
    int32_t             status;
    status = ESMEnableIntr (baseAddr, intrNum);

◆ ESMDisableIntr()

int32_t ESMDisableIntr ( uint32_t  baseAddr,
uint32_t  intrNum 
)

This API is used to disable interrupt.

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

None
Postcondition

None

Example

    uint32_t            baseAddr = CSL_MCU_ESM0_CFG_BASE;
    uint32_t            intrNum  = 0u;
    int32_t             cslRet;
    cslRet = ESMSetInfluenceOnErrPin (baseAddr, intrNum);

◆ ESMSetIntrPriorityLvl()

int32_t ESMSetIntrPriorityLvl ( 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
CSL_PASS - success
CSL_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 = CSL_MCU_ESM0_CFG_BASE;
    uint32_t            intrSrc  = CSL_ESM1_INTR_MCU0_CPU0_ECC_CORRECTED_LEVEL;
    esmIntrPriorityLvl_t pri     = ESM_INTR_PRIORITY_LEVEL_HIGH;
    int32_t             cslRet;
    cslRet = ESMSetIntrPriorityLvl (baseAddr, intrSrc, pri);

◆ ESMGetIntrPriorityLvl()

int32_t ESMGetIntrPriorityLvl ( 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
CSL_PASS - success
CSL_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 = CSL_MCU_ESM0_CFG_BASE;
    uint32_t            intrSrc  = CSL_ESM1_INTR_MCU0_CPU0_ECC_CORRECTED_LEVEL;
    esmIntrPriorityLvl_t            pri;
    int32_t             cslRet;
    cslRet = ESMGetIntrPriorityLvl (baseAddr, intrSrc, &pri);

◆ ESMGetIntrStatus()

int32_t ESMGetIntrStatus ( 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
CSL_PASS - success
CSL_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 = CSL_MCU_ESM0_CFG_BASE;
    uint32_t            status, intrSrc  = CSL_ESM1_INTR_MCU0_CPU0_ECC_CORRECTED_LEVEL;
    int32_t             cslRet;
    cslRet = ESMGetIntrStatus (baseAddr, intrSrc, &status);

◆ ESMSetIntrStatusRAW()

int32_t ESMSetIntrStatusRAW ( 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
CSL_PASS - success
CSL_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 = CSL_MCU_ESM0_CFG_BASE;
    uint32_t            intrSrc  = CSL_ESM1_INTR_MCU0_CPU0_ECC_CORRECTED_LEVEL;
    int32_t             cslRet;
    cslRet = ESMSetIntrStatusRAW (baseAddr, intrSrc);

◆ ESMGetIntrStatusRAW()

int32_t ESMGetIntrStatusRAW ( 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
CSL_PASS - success
CSL_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 = CSL_MCU_ESM0_CFG_BASE;
    uint32_t            intrSrc  = CSL_ESM1_INTR_MCU0_CPU0_ECC_CORRECTED_LEVEL;
    uitn32_t            status;
    int32_t             cslRet;
    cslRet = ESMGetIntrStatusRAW (baseAddr, intrSrc, &status);

◆ ESMGetGroupIntrStatus()

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.

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
CSL_PASS - success
CSL_EBADARGS - API fails due to bad input arguments
Precondition

ESM module is reset and initialized for desired operation
Postcondition

None

Example

    uint32_t            baseAddr = CSL_MCU_ESM0_CFG_BASE;
    esmIntrPriorityLvl  priType  = ESM_INTR_PRIORITY_LEVEL_HIGH;
    esmGroupIntrStatus_t groupIntrStatus;
    int32_t             cslRet;

    cslRet = ESMGetGroupIntrStatus (baseAddr, priType, &groupIntrStatus);

◆ ESMClearIntrStatus()

int32_t ESMClearIntrStatus ( 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
CSL_PASS - success
CSL_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 = CSL_MCU_ESM0_CFG_BASE;
    uint32_t            intrSrc  = CSL_ESM1_INTR_MCU0_CPU0_ECC_CORRECTED_LEVEL;
    int32_t             cslRet;
    cslRet = ESMClearIntrStatus (baseAddr, intrSrc);

◆ ESMWriteEOI()

int32_t ESMWriteEOI ( 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
CSL_PASS - success
CSL_EBADARGS - API fails due to bad input arguments
Precondition

ESM module is reset and initialized for desired operation
Postcondition

None

Example

    uint32_t            baseAddr = CSL_MCU_ESM0_CFG_BASE;
    esmIntrType_t       intrType  = ESM_INTR_TYPE_HIGH_PRIO_ERROR;
    int32_t             cslRet;
    cslRet = ESMWriteEOI (baseAddr, intrType);

◆ ESMGetRevisionId()

int32_t ESMGetRevisionId ( 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
CSL_PASS - success
CSL_EBADARGS - API fails due to bad input arguments
Precondition

ESM module is reset and initialized for desired operation
Postcondition

None

Example

    uint32_t            baseAddr = CSL_MCU_ESM0_CFG_BASE;
    esmRevisionId_t     revId;
    int32_t             cslRet;
    cslRet = ESMGetRevisionId (baseAddr, &revId);

◆ ESMGetInfo()

int32_t ESMGetInfo ( 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
CSL_PASS - success
CSL_EBADARGS - API fails due to bad input arguments
Precondition

None
Postcondition

None

Example

    uint32_t            baseAddr = CSL_MCU_ESM0_CFG_BASE;
    esmInfo_t           esmInfo;
    int32_t             cslRet;
    cslRet = ESMGetInfo (baseAddr, &esmInfo);

◆ ESMGetGlobalIntrEnabledStatus()

int32_t ESMGetGlobalIntrEnabledStatus ( 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
CSL_PASS - success
CSL_EBADARGS - API fails due to bad input arguments
Precondition

None
Postcondition

None

Example

    uint32_t            baseAddr = CSL_MCU_ESM0_CFG_BASE;
    uint32_t            enStatus;
    int32_t             cslRet;
    cslRet = ESMGetGlobalIntrEnabledStatus (baseAddr, &enStatus);

◆ ESMEnableGlobalIntr()

int32_t ESMEnableGlobalIntr ( uint32_t  baseAddr)

This API is used to enable Global control of interrupt.

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

ESM module is reset and initialized for desired operation
Postcondition

None

Example

    uint32_t            baseAddr = CSL_MCU_ESM0_CFG_BASE;
    int32_t             cslRet;
    cslRet = ESMEnableGlobalIntr (baseAddr);

◆ ESMDisableGlobalIntr()

int32_t ESMDisableGlobalIntr ( uint32_t  baseAddr)

This API is used to disable Global control of interrupt.

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

ESM module is reset and initialized for desired operation
Postcondition

None

Example

    uint32_t            baseAddr = CSL_MCU_ESM0_CFG_BASE;
    uint32_t            cslRet;
    cslRet = ESMDisableGlobalIntr (baseAddr);

◆ ESMReset()

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.

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

None
Postcondition

None

Example

    uint32_t            baseAddr = CSL_MCU_ESM0_CFG_BASE;
    uint32_t            cslRet;
    cslRet = ESMReset (baseAddr);

◆ ESMReadStaticRegs()

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.

Parameters
baseAddrBase Address of the ESM Registers.
pStaticRegspointer to static registers to be read
Returns
CSL_PASS - success
CSL_EBADARGS - API fails due to bad input arguments
Precondition

None
Postcondition

None

Example

    uint32_t            baseAddr = (uint32_t)CSL_MCU_ESM0_CFG_BASE;
    CSL_esmStaticRegs   staticRegs;
    uint32_t            cslRet;
    cslRet = ESMReadStaticRegs (baseAddr, &staticRegs);