📄 csl_edma3aux.h
字号:
* @verbatim
CSL_Edma3Handle hModule;
CSL_Edma3HwSetup hwSetup,gethwSetup;
CSL_Edma3Obj edmaObj;
CSL_Edma3ParamHandle hParamPing,hParamPong,hParamBasic;
CSL_Edma3ChannelObj ChObj;
CSL_Edma3QueryInfo info;
CSL_Edma3CmdIntr regionIntr;
CSL_Edma3CmdDrae regionAccess;
CSL_Edma3ChannelHandle hChannel;
CSL_Edma3ParamSetup myParamSetup;
CSL_Edma3Context context;
CSL_Edma3ChannelAttr chAttr;
CSL_Edma3HwChannelSetup dmahwSetup[CSL_EDMA3_NUM_DMACH] = \
CSL_EDMA3_DMACHANNELSETUP_DEFAULT;
CSL_Edma3HwChannelSetup getdmahwSetup[CSL_EDMA3_NUM_DMACH];
CSL_Status status;
Uint32 i, passStatus = 1;
// Module Initialization
CSL_edma3Init(&context);
// Module Level Open
hModule = CSL_edma3Open(&edmaObj,CSL_EDMA3,NULL,&status);
// Module Setup
hwSetup.dmaChaSetup = &dmahwSetup[0];
hwSetup.qdmaChaSetup = NULL;
CSL_edma3HwSetup(hModule,&hwSetup);
// Channel 0 Open in context of Shadow region 0
chAttr.regionNum = CSL_EDMA3_REGION_0;
chAttr.chaNum = CSL_EDMA3_CHA_DSP_EVT;
hChannel = CSL_edma3ChannelOpen(&ChObj, CSL_EDMA3, &chAttr, &status);
// 5,6,7 cleared
status = CSL_edma3InterruptClear(hModule,0x000000E0,0);
...
@endverbatim
* ===========================================================================
*/
CSL_IDEF_INLINE CSL_Status CSL_edma3InterruptClear (
CSL_Edma3Handle hModule,
Int region,
CSL_BitMask32 intrLo,
CSL_BitMask32 intrHi
)
{
if (region != CSL_EDMA3_REGION_GLOBAL) {
hModule->regs->SHADOW[region].ICR = intrLo;
hModule->regs->SHADOW[region].ICRH = intrHi;
}
else {
hModule->regs->ICR = intrLo;
hModule->regs->ICRH = intrHi;
}
return CSL_SOK;
}
/* =============================================================================
* @n@b CSL_edma3InterruptEval
*
* @b Description
* @n If any enabled interrutps are pending, the tpcc_intN output signal
* to be pulsed.
*
* @b Arguments
* @verbatim
hModule Module Handle
region Region Number
@endverbatim
*
* <b> Return Value </b> CSL_Status
* @n Always return CSL_SOK
*
* <b> Pre Condition </b>
* @n All CSL_edma3Init(), CSL_edma3Open(), must be called successfully in
* that order before CSL_edma3InterruptEval() can be called.
*
* <b> Post Condition </b>
* @n None
*
* @b Modifies
* @n None
*
* @b Example
* @verbatim
CSL_Edma3Handle hModule;
CSL_Edma3HwSetup hwSetup,gethwSetup;
CSL_Edma3Obj edmaObj;
CSL_Edma3ParamHandle hParamPing,hParamPong,hParamBasic;
CSL_Edma3ChannelObj ChObj;
CSL_Edma3QueryInfo info;
CSL_Edma3CmdIntr regionIntr;
CSL_Edma3CmdDrae regionAccess;
CSL_Edma3ChannelHandle hChannel;
CSL_Edma3ParamSetup myParamSetup;
CSL_Edma3Context context;
CSL_Edma3ChannelAttr chAttr;
CSL_Edma3HwChannelSetup dmahwSetup[CSL_EDMA3_NUM_DMACH] = \
CSL_EDMA3_DMACHANNELSETUP_DEFAULT;
CSL_Edma3HwChannelSetup getdmahwSetup[CSL_EDMA3_NUM_DMACH];
CSL_Status status;
Uint32 i, passStatus = 1;
// Module Initialization
CSL_edma3Init(&context);
// Module Level Open
hModule = CSL_edma3Open(&edmaObj,CSL_EDMA3,NULL,&status);
// Module Setup
hwSetup.dmaChaSetup = &dmahwSetup[0];
hwSetup.qdmaChaSetup = NULL;
CSL_edma3HwSetup(hModule,&hwSetup);
// Channel 0 Open in context of Shadow region 0
chAttr.regionNum = CSL_EDMA3_REGION_0;
chAttr.chaNum = CSL_EDMA3_CHA_DSP_EVT;
hChannel = CSL_edma3ChannelOpen(&ChObj,CSL_EDMA3, &chAttr, &status);
// Interrupt Evaluate
status = CSL_edma3InterruptEval(hModule);
...
@endverbatim
* ===========================================================================
*/
CSL_IDEF_INLINE CSL_Status CSL_edma3InterruptEval (
CSL_Edma3Handle hModule,
Int region
)
{
if (region != CSL_EDMA3_REGION_GLOBAL) {
hModule->regs->SHADOW[region].IEVAL = 1;
}
else {
hModule->regs->IEVAL = 1;
}
return CSL_SOK;
}
/* =============================================================================
* @n@b CSL_edma3MemFaultClear
*
* @b Description
* @n Clear Memory Fault.
*
* @b Arguments
* @verbatim
hModule Module Handle
@endverbatim
*
* <b> Return Value </b> CSL_Status
* @n Always return CSL_SOK
*
* <b> Pre Condition </b>
* @n All CSL_edma3Init(), CSL_edma3Open(), must be called successfully in
* that order before CSL_edma3MemFaultClear() can be called.
*
* <b> Post Condition </b>
* @n None
*
* @b Modifies
* @n None
*
* @b Example
* @verbatim
CSL_Edma3Handle hModule;
CSL_Edma3HwSetup hwSetup,gethwSetup;
CSL_Edma3Obj edmaObj;
CSL_Edma3ParamHandle hParamPing,hParamPong,hParamBasic;
CSL_Edma3ChannelObj ChObj;
CSL_Edma3QueryInfo info;
CSL_Edma3CmdIntr regionIntr;
CSL_Edma3CmdDrae regionAccess;
CSL_Edma3ChannelHandle hChannel;
CSL_Edma3ParamSetup myParamSetup;
CSL_Edma3Context context;
CSL_Edma3ChannelAttr chAttr;
CSL_Edma3HwChannelSetup dmahwSetup[CSL_EDMA3_NUM_DMACH] = \
CSL_EDMA3_DMACHANNELSETUP_DEFAULT;
CSL_Edma3HwChannelSetup getdmahwSetup[CSL_EDMA3_NUM_DMACH];
CSL_Status status;
Uint32 i, passStatus = 1;
// Module Initialization
CSL_edma3Init(&context);
// Module Level Open
hModule = CSL_edma3Open(&edmaObj,CSL_EDMA3,NULL,&status);
// Module Setup
hwSetup.dmaChaSetup = &dmahwSetup[0];
hwSetup.qdmaChaSetup = NULL;
CSL_edma3HwSetup(hModule,&hwSetup);
// Channel 0 Open in context of Shadow region 0
chAttr.regionNum = CSL_EDMA3_REGION_0;
chAttr.chaNum = CSL_EDMA3_CHA_DSP_EVT;
hChannel = CSL_edma3ChannelOpen(&ChObj, CSL_EDMA3, &chAttr, &status);
//... Channel Setup, trigger
status = CSL_edma3MemFaultClear(hModule);
...
@endverbatim
* ===========================================================================
*/
CSL_IDEF_INLINE CSL_Status CSL_edma3MemFaultClear (
CSL_Edma3Handle hModule
)
{
hModule->regs->MPFCR = 1;
return CSL_SOK;
}
/* =============================================================================
* @n@b CSL_edma3ControllerErrorClear
*
* @b Description
* @n Channel Controller Error Fault.
*
* @b Arguments
* @verbatim
hModule Module Handle
ccStat Error Status Handle
@endverbatim
*
* <b> Return Value </b> CSL_Status
* @n Always return CSL_SOK
*
* <b> Pre Condition </b>
* @n All CSL_edma3Init(), CSL_edma3Open(), must be called successfully in
* that order before CSL_edma3ControllerErrorClear() can be called.
*
* <b> Post Condition </b>
* @n None
*
* @b Modifies
* @n None
*
* @b Example
* @verbatim
CSL_Edma3Handle hModule;
CSL_Edma3HwSetup hwSetup,gethwSetup;
CSL_Edma3Obj edmaObj;
CSL_Edma3ParamHandle hParamPing,hParamPong,hParamBasic;
CSL_Edma3ChannelObj ChObj;
CSL_Edma3QueryInfo info;
CSL_Edma3CmdIntr regionIntr;
CSL_Edma3CmdDrae regionAccess;
CSL_Edma3ChannelHandle hChannel;
CSL_Edma3ParamSetup myParamSetup;
CSL_Edma3Context context;
CSL_Edma3ChannelAttr chAttr;
CSL_Edma3HwChannelSetup dmahwSetup[CSL_EDMA3_NUM_DMACH] = \
CSL_EDMA3_DMACHANNELSETUP_DEFAULT;
CSL_Edma3HwChannelSetup getdmahwSetup[CSL_EDMA3_NUM_DMACH];
CSL_Status status;
Uint32 i, passStatus = 1;
CSL_Edma3CtrlErrStat ccstatErr;
// Module Initialization
CSL_edma3Init(&context);
// Module Level Open
hModule = CSL_edma3Open(&edmaObj,CSL_EDMA3,NULL,&status);
// Module Setup
hwSetup.dmaChaSetup = &dmahwSetup[0];
hwSetup.qdmaChaSetup = NULL;
CSL_edma3HwSetup(hModule,&hwSetup);
// Channel 0 Open in context of Shadow region 0
chAttr.regionNum = CSL_EDMA3_REGION_0;
chAttr.chaNum = CSL_EDMA3_CHA_DSP_EVT;
hChannel = CSL_edma3ChannelOpen(&ChObj, CSL_EDMA3, &chAttr, &status);
//... Channel Setup, trigger
// Obtain the status error
status = CSL_edma3GetControllerError(hModule,&ccstatErr);
// Clear the error
CSL_edma3ControllerErrorClear(hModule,&ccstatErr);
...
@endverbatim
* ===========================================================================
*/
CSL_IDEF_INLINE CSL_Status CSL_edma3ControllerErrorClear (
CSL_Edma3Handle hModule,
CSL_Edma3CtrlErrStat *ccStat
)
{
/* Clears the errors */
hModule->regs->CCERRCLR = CSL_FMK(EDMA3CC_CCERRCLR_TCCERR, \
ccStat->exceedTcc) | ccStat->error;
return CSL_SOK;
}
/* =============================================================================
* @n@b CSL_edma3EventMissedClear
*
* @b Description
* @n Clear the Event missed errors
*
* @b Arguments
* @verbatim
hModule Module Handle
missedLo Lower 32 of of the Event Missed register needing to
be cleared
missedHi Upper 32 of of the Event Missed register needing to
be cleared
missedQdma Bit mask of Qdma events missed needing to be cleared
@endverbatim
*
* <b> Return Value </b> CSL_Status
* @n Always return CSL_SOK
*
* <b> Pre Condition </b>
* @n All CSL_edma3Init(), CSL_edma3Open(), must be called successfully in
* that order before CSL_edma3EventMissedClear() can be called.
*
* <b> Post Condition </b>
* @n None
*
* @b Modifies
* @n None
*
* @b Example
* @verbatim
CSL_Edma3Handle hModule;
CSL_Edma3HwSetup hwSetup,gethwSetup;
CSL_Edma3Obj edmaObj;
CSL_Edma3ParamHandle hParamPing,hParamPong,hParamBasic;
CSL_Edma3ChannelObj ChObj;
CSL_Edma3QueryInfo info;
CSL_Edma3CmdIntr regionIntr;
CSL
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -