📄 csl_rti.h
字号:
...
@endverbatim
* =============================================================================
*/
extern CSL_Status CSL_rtiClose (
CSL_RtiHandle hRti
);
/** ============================================================================
* @n@b CSL_rtiHwSetup
*
* @b Description
* @n It configures the Real time interrupt registers as per the values
* passed in the hardware setup structure.
*
* @b Arguments
* @verbatim
hRti Handle to the Real time interrupt
hwSetup Pointer to harware setup structure
@endverbatim
*
* <b> Return Value </b> CSL_Status
* @li CSL_SOK - Hardware setup successful
* @li CSL_ESYS_BADHANDLE - Invalid handle
* @li CSL_ESYS_INVPARAMS - Hardware structure is not
properly initialized
*
* <b> Pre Condition </b>
* @n None
*
* <b> Post Condition </b>
* @n Real time interrupt registers are configured according to the
* hardware setup parameters
*
* @b Modifies
* @n Real time interrupt registers
*
* @b Example
* @verbatim
CSL_RtiHandle hRti;
CSL_RtiObj rtiObj;
CSL_status status;
CSL_RtiHwSetup hwSetup;
...
hRti = CSL_rtiOpen (&rtiObj, CSL_RTI, NULL, &status);
hwSetup.contOnSuspend = CSL_RTI_COUNTERS_RUN;
hwSetup.blk0ExtnCntl = CSL_RTI_CAPTURE_EVENT_SOURCE0;
hwSetup.blk1ExtnCntl = CSL_RTI_CAPTURE_EVENT_SOURCE0;
hwSetup.compare0Cntl = CSL_RTI_FRC0_COMPARE_ENABLE;
hwSetup.compare1Cntl = CSL_RTI_FRC0_COMPARE_ENABLE;
hwSetup.compare2Cntl = CSL_RTI_FRC0_COMPARE_ENABLE;
hwSetup.compare3Cntl = CSL_RTI_FRC0_COMPARE_ENABLE;
hwSetup.counters.frc0Counter = FRC0_TEST_VALUE;
hwSetup.counters.uc0Counter = UC0_TEST_VALUE;
hwSetup.counters.frc1Counter = FRC1_TEST_VALUE;
hwSetup.counters.uc1Counter = UC1_TEST_VALUE;
hwSetup.compareUpCntrs.compareUpCntr0 = UC0_COMP_VALUE;
hwSetup.compareUpCntrs.compareUpCntr1 = UC1_COMP_VALUE;
hwSetup.compVal.comp0Val = COMPARE0_VALUE;
hwSetup.compVal.comp1Val = COMPARE1_VALUE;
hwSetup.compVal.comp2Val = COMPARE2_VALUE;
hwSetup.compVal.comp3Val = COMPARE3_VALUE;
hwSetup.updateCompVal.updateComp0Val = UPDATE_COMPARE0_VALUE;
hwSetup.updateCompVal.updateComp1Val = UPDATE_COMPARE1_VALUE;
hwSetup.updateCompVal.updateComp2Val = UPDATE_COMPARE2_VALUE;
hwSetup.updateCompVal.updateComp3Val = UPDATE_COMPARE3_VALUE;
hwSetup.intEnable.compIntr0En = FALSE;
hwSetup.intEnable.compIntr1En = FALSE;
hwSetup.intEnable.compIntr2En = FALSE;
hwSetup.intEnable.compIntr3En = FALSE;
hwSetup.intEnable.ovlInt0En = FALSE;
hwSetup.intEnable.ovlInt0En = FALSE;
hwSetup.dmaReq.dmareq0En = FALSE;
hwSetup.dmaReq.dmareq1En = FALSE;
hwSetup.dmaReq.dmareq2En = FALSE;
hwSetup.dmaReq.dmareq3En = FALSE;
hwSetup.preLoadWatchdog = 0x1FFF;
status = CSL_rtiHwsetup (hRti, &hwSetup);
@endverbatim
* =============================================================================
*/
extern CSL_Status CSL_rtiHwSetup (
CSL_RtiHandle hRti,
CSL_RtiHwSetup *hwSetup
);
/** ============================================================================
* @n@b CSL_rtiHwSetupRaw
*
* @b Description
* @n This function initializes the device registers with the register-values
* provided through the Config Data structure.
*
* @b Arguments
* @verbatim
hRti Handle to the RTI instance
config Pointer to config structure
@endverbatim
*
* <b> Return Value </b> CSL_Status
* @li CSL_SOK - Configuration successful
* @li CSL_ESYS_BADHANDLE - Invalid handle
* @li CSL_ESYS_INVPARAMS - Configuration is not
* properly initialized
*
* <b> Pre Condition </b>
* @n None
*
* <b> Post Condition </b>
* @n The registers of the specified RTI instance will be setup
* according to value passed
*
* @b Modifies
* @n Hardware registers of the specified RTI instance
*
* @b Example
* @verbatim
CSL_RtiHandle hRti;
CSL_RtiConfig config = CSL_RTI_CONFIG_DEFAULTS;
CSL_Status status;
status = CSL_rtiHwSetupRaw (hRti, &config);
@endverbatim
* =============================================================================
*/
extern CSL_Status CSL_rtiHwSetupRaw (
CSL_RtiHandle hRti,
CSL_RtiConfig *config
);
/** ============================================================================
* @n@b CSL_rtiGetHwSetup
*
* @b Description
* @n It retrives the hardware setup parameters of the real time interrupt
* module specified by the given handle.
*
* @b Arguments
* @verbatim
hRti Handle to the real time interrupt
hwSetup Pointer to the harware setup structure
@endverbatim
*
* <b> Return Value </b> CSL_Status
* @li CSL_SOK - Retrieving the hardware setup
* parameters is successful
* @li CSL_ESYS_BADHANDLE - The handle is passed is
* invalid
*
* <b> Pre Condition </b>
* @n None
*
* <b> Post Condition </b>
* @n The hardware setup structure is populated with the hardware setup
* parameters
*
* @b Modifies
* @n hwSetup variable
*
* @b Example
* @verbatim
CSL_RtiHandle hRti;
CSL_RtiHwSetup hwSetup;
...
status = CSL_rtiGetHwSetup (hRti, &hwSetup);
...
@endverbatim
* ===========================================================================
*/
extern CSL_Status CSL_rtiGetHwSetup (
CSL_RtiHandle hRti,
CSL_RtiHwSetup *hwSetup
);
/** ============================================================================
* @n@b CSL_rtiHwControl
*
* @b Description
* @n This function performs various control operations on the real time
* interrupt, based on the command passed.
*
* @b Arguments
* @verbatim
hRti Handle to the real time interrupt
cmd Operation to be performed on the real time interrupt
cmdArg Arguement specific to the command
@endverbatim
*
* <b> Return Value </b> CSL_Status
* @li CSL_SOK - Command execution successful.
* @li CSL_ESYS_BADHANDLE - Invalid handle
* @li CSL_ESYS_INVCMD - Invalid command
*
* <b> Pre Condition </b>
* @n None
*
* <b> Post Condition </b>
* @n Real time interrupt registers are configured according to the command
* and the command arguements. The command determines which registers
* are modified.
*
* @b Modifies
* @n Real time interrupt registers determined by the command
*
* @b Example
* @verbatim
CSL_RtiHandle hRti;
Uint32 dwdCounterDis = 0x5312ACED;
...
status = CSL_rtiHwControl(hRti, CSL_RTI_CMD_DWD_ENABLE, \
&dwdCounterDis);
...
@endverbatim
* =============================================================================
*/
extern CSL_Status CSL_rtiHwControl (
CSL_RtiHandle hRti,
CSL_RtiHwControlCmd cmd,
void *arg
);
/** ============================================================================
* @n@b CSL_rtiGetHwStatus
*
* @b Description
* @n This function is used to get the value of various parameters of the
* real time interrupt. The value returned depends on the query passed.
*
* @b Arguments
* @verbatim
hRti Handle to the real time interrupt
query Query to be performed.
response Pointer to buffer to return the data requested by
the query passed
@endverbatim
*
* <b> Return Value </b> CSL_Status
* @li CSL_SOK - Successful completion of the
* query
*
* @li CSL_ESYS_BADHANDLE - Invalid handle
*
* @li CSL_ESYS_INVQUERY - Query command not supported
*
* <b> Pre Condition </b>
* @n None
*
* <b> Post Condition </b>
* Data requested by the query is returned through the variable "response"
*
* @b Modifies
* @n The input arguement "response" is modified
*
* @b Example
* @verbatim
Uint32 count = 0;
CSL_Status status;
...
status = CSL_rtiGetHwStatus (hRti, CSL_RTI_QUERY_CUR_FRC0_CNT,
&count);
...
@endverbatim
* =============================================================================
*/
extern CSL_Status CSL_rtiGetHwStatus (
CSL_RtiHandle hRti,
CSL_RtiHwStatusQuery query,
void *response
);
/** ============================================================================
* @n@b CSL_rtiGetBaseAddress
*
* @b Description
* @n Function to get the base address of the peripheral instance.
* This function is used for getting the base address of the peripheral
* instance. This function will be called inside the CSL_rtiOpen()
* function call.This function is open for re-implementing if the user
* wants to modify the base address of the peripheral object to point to
* a different location and there by allow CSL initiated write/reads into
* peripheral MMR's go to an alternate location.
*
* @b Arguments
* @verbatim
rtiNum Specifies the instance of the RTI to be opened.
pRtiParam Module specific parameters.
pBaseAddress Pointer to baseaddress structure containing base
address details.
@endverbatim
*
* <b> Return Value </b> CSL_Status
* @li CSL_OK Open call is successful
* @li CSL_ESYS_FAIL The instance number is invalid.
*
* <b> Pre Condition </b>
* @n None
*
* <b> Post Condition </b>
* @n Base Address structure is populated
*
* @b Modifies
* @n 1. The status variable
*
* 2. Base address structure is modified.
*
* @b Example
* @verbatim
CSL_Status status;
CSL_rtiBaseAddress baseAddress;
...
status = CSL_rtiGetBaseAddress(CSL_RTI, NULL, &baseAddress);
@endverbatim
* ===========================================================================
*/
extern CSL_Status CSL_rtiGetBaseAddress (
CSL_InstNum rtiNum,
CSL_RtiParam *pRtiParam,
CSL_RtiBaseAddress *pBaseAddress
);
#ifdef __cplusplus
}
#endif
#endif /* _CSL_RTI_H_ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -