PDK API Guide for J721E
|
===========================================================================
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... | |
int32_t ESMSetMode | ( | 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 = CSL_MCU_ESM0_CFG_BASE; esmOperationMode_t mode = ESM_OPERATION_MODE_ERROR_FORCE; int32_t cslRet; cslRet = ESMSetMode (baseAddr, mode);
int32_t ESMGetMode | ( | 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 = CSL_MCU_ESM0_CFG_BASE; esmOperationMode_t mode; uint32_t cslRet; cslRet = ESMGetMode (baseAddr, &mode);
int32_t ESMSetInfluenceOnErrPin | ( | 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 = CSL_MCU_ESM0_CFG_BASE; uint32_t intrSrc = CSL_ESM1_INTR_MCU0_CPU0_ECC_CORRECTED_LEVEL; int32_t cslRet; cslRet = ESMSetInfluenceOnErrPin (baseAddr, intrSrc, TRUE);
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.
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 = 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);
int32_t ESMSetErrPinLowTimePreload | ( | 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 = CSL_MCU_ESM0_CFG_BASE; uint32_t pinCntrPre = 100; int32_t cslRet; cslRet = ESMSetErrPinLowTimePreload (baseAddr, pinCntrPre);
int32_t ESMGetErrPinLowTimePreload | ( | 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 = CSL_MCU_ESM0_CFG_BASE; uint32_t inCntrPre; int32_t cslRet; cslRet = ESMGetErrPinLowTimePreload (baseAddr, &inCntrPre);
int32_t ESMGetCurrErrPinLowTimeCnt | ( | 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 = CSL_MCU_ESM0_CFG_BASE; uint32_t pinCntrPre; int32_t cslRet; cslRet = ESMGetCurrErrPinLowTimeCnt (baseAddr, &pinCntrPre);
int32_t ESMGetErrPinStatus | ( | 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 = CSL_MCU_ESM0_CFG_BASE; uint32_t status; uint32_t cslRet; cslRet = ESMGetErrPinStatus (baseAddr, &status);
int32_t ESMResetErrPin | ( | uint32_t | baseAddr | ) |
This API is used to reset the nERROR pin.
baseAddr | Base Address of the ESM Registers. |
Example
uint32_t baseAddr = CSL_MCU_ESM0_CFG_BASE; int32_t cslRet; cslRet = ESMResetErrPin (baseAddr);
int32_t ESMIsEnableIntr | ( | 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 = CSL_MCU_ESM0_CFG_BASE; uint32_t status, intrNum = 0u; int32_t cslRet; cslRet = ESMIsEnableIntr (baseAddr, intrNum, &status);
int32_t ESMEnableIntr | ( | 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 = CSL_MCU_ESM0_CFG_BASE; uint32_t intrNum = 0u; int32_t status; status = ESMEnableIntr (baseAddr, intrNum);
int32_t ESMDisableIntr | ( | 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 = CSL_MCU_ESM0_CFG_BASE; uint32_t intrNum = 0u; int32_t cslRet; cslRet = ESMSetInfluenceOnErrPin (baseAddr, intrNum);
int32_t ESMSetIntrPriorityLvl | ( | 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 = 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);
int32_t ESMGetIntrPriorityLvl | ( | 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 = 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);
int32_t ESMGetIntrStatus | ( | 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 = 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);
int32_t ESMSetIntrStatusRAW | ( | 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 = CSL_MCU_ESM0_CFG_BASE; uint32_t intrSrc = CSL_ESM1_INTR_MCU0_CPU0_ECC_CORRECTED_LEVEL; int32_t cslRet; cslRet = ESMSetIntrStatusRAW (baseAddr, intrSrc);
int32_t ESMGetIntrStatusRAW | ( | 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 = 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);
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.
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 = CSL_MCU_ESM0_CFG_BASE; esmIntrPriorityLvl priType = ESM_INTR_PRIORITY_LEVEL_HIGH; esmGroupIntrStatus_t groupIntrStatus; int32_t cslRet; cslRet = ESMGetGroupIntrStatus (baseAddr, priType, &groupIntrStatus);
int32_t ESMClearIntrStatus | ( | 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 = CSL_MCU_ESM0_CFG_BASE; uint32_t intrSrc = CSL_ESM1_INTR_MCU0_CPU0_ECC_CORRECTED_LEVEL; int32_t cslRet; cslRet = ESMClearIntrStatus (baseAddr, intrSrc);
int32_t ESMWriteEOI | ( | 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 = CSL_MCU_ESM0_CFG_BASE; esmIntrType_t intrType = ESM_INTR_TYPE_HIGH_PRIO_ERROR; int32_t cslRet; cslRet = ESMWriteEOI (baseAddr, intrType);
int32_t ESMGetRevisionId | ( | 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 = CSL_MCU_ESM0_CFG_BASE; esmRevisionId_t revId; int32_t cslRet; cslRet = ESMGetRevisionId (baseAddr, &revId);
int32_t ESMGetInfo | ( | 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 = CSL_MCU_ESM0_CFG_BASE; esmInfo_t esmInfo; int32_t cslRet; cslRet = ESMGetInfo (baseAddr, &esmInfo);
int32_t ESMGetGlobalIntrEnabledStatus | ( | 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 = CSL_MCU_ESM0_CFG_BASE; uint32_t enStatus; int32_t cslRet; cslRet = ESMGetGlobalIntrEnabledStatus (baseAddr, &enStatus);
int32_t ESMEnableGlobalIntr | ( | uint32_t | baseAddr | ) |
This API is used to enable Global control of interrupt.
baseAddr | Base Address of the ESM Registers. |
Example
uint32_t baseAddr = CSL_MCU_ESM0_CFG_BASE; int32_t cslRet; cslRet = ESMEnableGlobalIntr (baseAddr);
int32_t ESMDisableGlobalIntr | ( | uint32_t | baseAddr | ) |
This API is used to disable Global control of interrupt.
baseAddr | Base Address of the ESM Registers. |
Example
uint32_t baseAddr = CSL_MCU_ESM0_CFG_BASE; uint32_t cslRet; cslRet = ESMDisableGlobalIntr (baseAddr);
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.
baseAddr | Base Address of the ESM Registers. |
Example
uint32_t baseAddr = CSL_MCU_ESM0_CFG_BASE; uint32_t cslRet; cslRet = ESMReset (baseAddr);
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.
baseAddr | Base Address of the ESM Registers. |
pStaticRegs | pointer to static registers to be read |
Example
uint32_t baseAddr = (uint32_t)CSL_MCU_ESM0_CFG_BASE; CSL_esmStaticRegs staticRegs; uint32_t cslRet; cslRet = ESMReadStaticRegs (baseAddr, &staticRegs);