This module contains the APIs to program and use the CCM module.
Files | |
file | sdl_ip_ccm.h |
Header file contains enumerations, structure definitions and function declarations for SDL CCM interface. | |
Data Structures | |
struct | SDL_CCM_staticRegs |
CCM Static Register. More... | |
struct | SDL_CCM_ErrorStatus_t |
Structure for CCM error status. More... | |
struct | SDL_vimStaticRegs_GRP |
This structure defines the group registers identified for VIM static registers. More... | |
struct | SDL_vimStaticRegs |
This structure defines the static register groups identified for VIM. More... | |
Functions | |
int32_t | SDL_CCM_init (SDL_CCM_Inst instance, uint32_t index) |
Initialization API for CCM module. More... | |
int32_t | SDL_CCM_verifyConfig (SDL_CCM_Inst instance) |
Verifies the configuration done as part of SDL_CCM_init is as expected. More... | |
int32_t | SDL_CCM_selfTest (SDL_CCM_Inst instance, SDL_CCM_MonitorType monitorType, SDL_CCM_SelfTestType testType, uint32_t polarityInversionMask, uint32_t timeoutCnt) |
Executes a self-test of the CCM module. The types of self-tests supported are described in detail in SDL_CCM_SelfTestType. More... | |
int32_t | SDL_CCM_injectError (SDL_CCM_Inst instance, SDL_CCM_MonitorType monitorType) |
Forces an error to be generated for the selected monitor type. After injecting the error, an ESM error event is generated and the application will receive notification via ESM application callback. More... | |
int32_t | SDL_CCM_getStaticRegisters (SDL_CCM_Inst instance, SDL_CCM_staticRegs *pStaticRegs) |
Retrieves the static register configuration. The values returned in staticRegs can be saved by the application and periodically checked for changes. Note: This API should not be called while running any self-test or during error injection, as this will change the values of the static registers temporarily. It should be called only when in normal operating mode. More... | |
int32_t | SDL_CCM_getErrorType (SDL_CCM_Inst instance, uint32_t intSrc, SDL_CCM_MonitorType *monitorType) |
Gets the monitor type for which the CCM error was generated. Takes the ESM interrupt source as input. More... | |
int32_t | SDL_CCM_clearError (SDL_CCM_Inst instance, SDL_CCM_MonitorType monitorType) |
Clears the compare error for the selected monitor type. More... | |
int32_t | SDL_VIM_cfgIntr (SDL_vimRegs *pRegs, uint32_t intrNum, uint32_t pri, SDL_VimIntrMap intrMap, SDL_VimIntrType intrType, uint32_t vecAddr) |
Configure a source interrupt using VIM. More... | |
int32_t | SDL_VIM_verifyCfgIntr (SDL_vimRegs *pRegs, uint32_t intrNum, uint32_t pri, SDL_VimIntrMap intrMap, SDL_VimIntrType intrType, uint32_t vecAddr) |
Read back Verify Configure a source interrupt. More... | |
int32_t | SDL_VIM_getStaticRegs (SDL_vimRegs *pRegs, SDL_vimStaticRegs *pStaticRegs) |
Read back of static registers for VIM. More... | |
Typedefs | |
typedef uint32_t | SDL_VimIntrMap |
This enumerator defines the possible output interrupt types. Each source interrupt can be configured to drive either the IRQ or FIQ output signal. More... | |
typedef uint32_t | SDL_VimIntrType |
This enumerator defines the possible interrupt types. Each source interrupt is either an active high level or active high pulse. More... | |
Enumerations | |
enum | SDL_CCM_MonitorType { SDL_CCM_MONITOR_TYPE_NONE = 0, SDL_CCM_MONITOR_TYPE_OUTPUT_COMPARE_BLOCK = 1, SDL_CCM_MONITOR_TYPE_VIM = 2, SDL_CCM_MONITOR_TYPE_INACTIVITY_MONITOR = 3, SDL_CCM_MONITOR_TYPE_INVALID = 4 } |
This enumerator defines the type of CCM Monitor type. More... | |
enum | SDL_CCM_SelfTestType { SDL_CCM_SELFTEST_TYPE_NORMAL = 1, SDL_CCM_SELFTEST_TYPE_ERROR_FORCING = 2, SDL_CCM_SELFTEST_POLARITY_INVERSION = 3, SDL_CCM_SELFTEST_TYPE_INVALID = 4 } |
This enumerator defines the type of CCM Self-test type. More... | |
Macros | |
#define | SDL_VIM_MAX_INTR_GROUPS (32U) |
#define | SDL_VIM_NUM_INTRS_PER_GROUP (32U) |
#define | SDL_VIM_INTR_MAP_IRQ ((uint32_t)0U) |
#define | SDL_VIM_INTR_MAP_FIQ ((uint32_t)1U) |
#define | SDL_VIM_INTR_MAP_ALL ((uint32_t)2U) |
#define | SDL_VIM_INTR_TYPE_LEVEL ((uint32_t)0U) |
#define | SDL_VIM_INTR_TYPE_PULSE ((uint32_t)1U) |
#define SDL_VIM_MAX_INTR_GROUPS (32U) |
This enumerator defines the maximum interrupt groups in VIM.
#define SDL_VIM_NUM_INTRS_PER_GROUP (32U) |
This enumerator defines the number of interrupts per group in VIM.
#define SDL_VIM_INTR_MAP_IRQ ((uint32_t)0U) |
Output interrupt is mapped to IRQ
#define SDL_VIM_INTR_MAP_FIQ ((uint32_t)1U) |
Output interrupt is mapped to FIQ
#define SDL_VIM_INTR_MAP_ALL ((uint32_t)2U) |
Output interrupt is mapped to IRQ or FIQ
#define SDL_VIM_INTR_TYPE_LEVEL ((uint32_t)0U) |
Interrupt source is a level interrupt type
#define SDL_VIM_INTR_TYPE_PULSE ((uint32_t)1U) |
Interrupt source is a pulse interrupt type
typedef uint32_t SDL_VimIntrMap |
This enumerator defines the possible output interrupt types. Each source interrupt can be configured to drive either the IRQ or FIQ output signal.
typedef uint32_t SDL_VimIntrType |
This enumerator defines the possible interrupt types. Each source interrupt is either an active high level or active high pulse.
enum SDL_CCM_MonitorType |
This enumerator defines the type of CCM Monitor type.
enum SDL_CCM_SelfTestType |
This enumerator defines the type of CCM Self-test type.
int32_t SDL_CCM_init | ( | SDL_CCM_Inst | instance, |
uint32_t | index | ||
) |
Initialization API for CCM module.
instance | [IN] CCM Instance |
index | [IN] bit map array index value |
int32_t SDL_CCM_verifyConfig | ( | SDL_CCM_Inst | instance | ) |
Verifies the configuration done as part of SDL_CCM_init is as expected.
instance | [IN] CCM Instance |
int32_t SDL_CCM_selfTest | ( | SDL_CCM_Inst | instance, |
SDL_CCM_MonitorType | monitorType, | ||
SDL_CCM_SelfTestType | testType, | ||
uint32_t | polarityInversionMask, | ||
uint32_t | timeoutCnt | ||
) |
Executes a self-test of the CCM module. The types of self-tests supported are described in detail in SDL_CCM_SelfTestType.
instance | [IN] CCM Instance |
monitorType | [IN] Monitor type for which to run the self-test |
testType | [IN] Test type to run for the selected monitor type. |
polarityInversionMask | [IN] Mask used to invert polarity of selected signals. For meaning of signals, refer to hardware manuals. This parameter is used only for the polarity inversion self-test type |
timeoutCnt | [IN] Number of times to check for self-test completion in a loop before timing out |
int32_t SDL_CCM_injectError | ( | SDL_CCM_Inst | instance, |
SDL_CCM_MonitorType | monitorType | ||
) |
Forces an error to be generated for the selected monitor type. After injecting the error, an ESM error event is generated and the application will receive notification via ESM application callback.
instance | [IN] CCM Instance |
monitorType | [IN] Monitor type for which to inject the error |
int32_t SDL_CCM_getStaticRegisters | ( | SDL_CCM_Inst | instance, |
SDL_CCM_staticRegs * | pStaticRegs | ||
) |
Retrieves the static register configuration. The values returned in staticRegs can be saved by the application and periodically checked for changes. Note: This API should not be called while running any self-test or during error injection, as this will change the values of the static registers temporarily. It should be called only when in normal operating mode.
instance | [IN] CCM Instance |
pStaticRegs | [OUT] Pointer to the variable to store the static register information |
int32_t SDL_CCM_getErrorType | ( | SDL_CCM_Inst | instance, |
uint32_t | intSrc, | ||
SDL_CCM_MonitorType * | monitorType | ||
) |
Gets the monitor type for which the CCM error was generated. Takes the ESM interrupt source as input.
instance | [IN] CCM Instance |
intSrc | [IN] ESM interrupt source used to check for monitorType that generated the error |
monitorType | [OUT] Monitor type which generated the error |
int32_t SDL_CCM_clearError | ( | SDL_CCM_Inst | instance, |
SDL_CCM_MonitorType | monitorType | ||
) |
Clears the compare error for the selected monitor type.
instance | [IN] CCM Instance |
monitorType | [IN] Monitor type for which to clear the error |
int32_t SDL_VIM_cfgIntr | ( | SDL_vimRegs * | pRegs, |
uint32_t | intrNum, | ||
uint32_t | pri, | ||
SDL_VimIntrMap | intrMap, | ||
SDL_VimIntrType | intrType, | ||
uint32_t | vecAddr | ||
) |
Configure a source interrupt using VIM.
This function configures the specified source interrupt per the provided parameters.
pRegs | [IN] Pointer to the SDL_vimRegs register structure |
intrNum | [IN] Interrupt number |
pri | [IN] Interrupt priority (0(highest)..15(lowest)) |
intrMap | [IN] Interrupt mapping |
intrType | [IN] Interrupt type |
vecAddr | [IN] 32-bit vector address (forced to 32-bit alignment) |
int32_t SDL_VIM_verifyCfgIntr | ( | SDL_vimRegs * | pRegs, |
uint32_t | intrNum, | ||
uint32_t | pri, | ||
SDL_VimIntrMap | intrMap, | ||
SDL_VimIntrType | intrType, | ||
uint32_t | vecAddr | ||
) |
Read back Verify Configure a source interrupt.
This function verifies the writetn configuration of interrupt for the specified source interrupt per the provided parameters.
pRegs | [IN] Pointer to the SDL_vimRegs register structure |
intrNum | [IN] Interrupt number |
pri | [IN] Interrupt priority (0(highest)..15(lowest)) |
intrMap | [IN] Interrupt mapping |
intrType | [IN] Interrupt type |
vecAddr | [IN] 32-bit vector address (forced to 32-bit alignment) |
int32_t SDL_VIM_getStaticRegs | ( | SDL_vimRegs * | pRegs, |
SDL_vimStaticRegs * | pStaticRegs | ||
) |
Read back of static registers for VIM.
The function is used to acknowlege that the specified interrupt type has been serviced. The VIM will then re-evaluate the new highest priority interrupt.
pRegs | [IN] Pointer to the SDL_vimRegs register structure |
pStaticRegs | [IN] Pointer to the SDL_vimStaticRegs structure to hold the static register values The static register set is defined to be the list of registers that hardware does not update by itself |