TMS320F28335学习笔记——DMA

 TI提供的SPR530(C2833x/C2823x C/C++ 头文件和外设示例)使我们非常方便的使用2833X和2823X的外设。下面就它定义的函数加一个说明。
// $TI Release: DSP2833x Header Files V1.10 $
// $Release Date: February 15, 2008 $
//**************在DSP2833x_Adc.c中定义的,共1个函数**************************//
void InitAdc(void);//在DSP2833x_Adc.c中定义,初始化ADC,使能ADCCLK,调入ADC的出厂刻度数据,上电。
//**************在DSP2833x_DMA.c中定义的,共37个函数**************************//
void DMAInitialize(void);//执行DMA硬件复位,设置DMA不受仿真器的影响。。
// DMA Channel 1
void DMACH1AddrConfig(volatile Uint16 *DMA_Dest,volatile Uint16 *DMA_Source);
//设置DMA的源和目标
void DMACH1BurstConfig(Uint16 bsize, int16 srcbstep, int16 desbstep);
//设置每次Burst的字节数、源地址增量、目标地址增量。注意对于28335,BYTE和WORD是一样的,都是16BIT。
void DMACH1TransferConfig(Uint16 tsize, int16 srctstep, int16 deststep);
//设置每次传送包含多少个Burst、传送完毕发中断,源地址增量、目标地址增量
void DMACH1WrapConfig(Uint16 srcwsize, int16 srcwstep, Uint16 deswsize, int16 deswstep);
//设置传送完毕的源地址和目标地址
void DMACH1ModeConfig(Uint16 persel, Uint16 perinte, Uint16 oneshot, Uint16 cont, Uint16 synce, Uint16 syncsel, Uint16 ovrinte, Uint16 datasize, Uint16 chintmode, Uint16 chinte);
//设置DMA工作模式,包括触发源、是否使能触发源、是否使能oneshot模式、是否使能Continuous模式、是否使能外围设备同步、选择同步模式、溢出中断等。)
参数说明:
persel--选择触发源,值为下列选项
    DMA_SEQ1INT--------ADC
    DMA_SEQ2INT--------ADC 
    DMA_XINT1  --------外部中断
    DMA_XINT2  --------外部中断 
    DMA_XINT3  --------外部中断 
    DMA_XINT4  --------外部中断 
    DMA_XINT5  --------外部中断 
    DMA_XINT6  --------外部中断 
    DMA_XINT7  --------外部中断 
    DMA_XINT13 --------外部中断 
    DMA_TINT0  --------CPU时钟 
    DMA_TINT1  --------CPU时钟 
    DMA_TINT2  --------CPU时钟 
    DMA_MXEVTA  --------McBSP-A
    DMA_MREVTA  --------McBSP-A
    DMA_MXREVTB --------McBSP-B
    DMA_MREVTB  --------McBSP-B
perinte--使能触发源,值为PERINT_DISABLE或PERINT_ENABLE
oneshot--使能oneshot模式,值为ONESHOT_DISABLE或ONESHOT_ENABLE。此模式下,一次触发完成全部burst。
cont--使能Continuous模式,值为CONT_DISABLE或CONT_ENABLE。此模式下,传送完毕后DMA重新被初始化,并等待触发源。
synce--使能外围设备同步,值为SYNC_DISABLE或SYNC_ENABLE。
syncsel--同步选择。值为SYNC_SRC或SYNC_DST。
ovrinte--使能溢出中断。值为OVRFLOW_DISABLE或OVEFLOW_ENABLE。
datasize--每次传送位数。值为SIXTEEN_BIT或THIRTYTWO_BIT。
chintmode--通道中断产生模式。CHINT_BEGIN:传送开始发中断。CHINT_END:传送结束发中断。
chinte--使能通道中断。值为CHINT_DISABLE或CHINT_ENABLE。
void StartDMACH1(void);
//启动DMACH1
//其它5个通道的DMA的函数功能含义是一样的
// DMA Channel 2
void DMACH2AddrConfig(volatile Uint16 *DMA_Dest,volatile Uint16 *DMA_Source);
void DMACH2BurstConfig(Uint16 bsize, int16 srcbstep, int16 desbstep);
void DMACH2TransferConfig(Uint16 tsize, int16 srctstep, int16 deststep);
void DMACH2WrapConfig(Uint16 srcwsize, int16 srcwstep, Uint16 deswsize, int16 deswstep);
void DMACH2ModeConfig(Uint16 persel, Uint16 perinte, Uint16 oneshot, Uint16 cont, Uint16 synce, Uint16 syncsel, Uint16 ovrinte, Uint16 datasize, Uint16 chintmode, Uint16 chinte);
void StartDMACH2(void);
// DMA Channel 3
void DMACH3AddrConfig(volatile Uint16 *DMA_Dest,volatile Uint16 *DMA_Source);
void DMACH3BurstConfig(Uint16 bsize, int16 srcbstep, int16 desbstep);
void DMACH3TransferConfig(Uint16 tsize, int16 srctstep, int16 deststep);
void DMACH3WrapConfig(Uint16 srcwsize, int16 srcwstep, Uint16 deswsize, int16 deswstep);
void DMACH3ModeConfig(Uint16 persel, Uint16 perinte, Uint16 oneshot, Uint16 cont, Uint16 synce, Uint16 syncsel, Uint16 ovrinte, Uint16 datasize, Uint16 chintmode, Uint16 chinte);
void StartDMACH3(void);
// DMA Channel 4
void DMACH4AddrConfig(volatile Uint16 *DMA_Dest,volatile Uint16 *DMA_Source);
void DMACH4BurstConfig(Uint16 bsize, int16 srcbstep, int16 desbstep);
void DMACH4TransferConfig(Uint16 tsize, int16 srctstep, int16 deststep);
void DMACH4WrapConfig(Uint16 srcwsize, int16 srcwstep, Uint16 deswsize, int16 deswstep);
void DMACH4ModeConfig(Uint16 persel, Uint16 perinte, Uint16 oneshot, Uint16 cont, Uint16 synce, Uint16 syncsel, Uint16 ovrinte, Uint16 datasize, Uint16 chintmode, Uint16 chinte);
void StartDMACH4(void);
// DMA Channel 5
void DMACH5AddrConfig(volatile Uint16 *DMA_Dest,volatile Uint16 *DMA_Source);
void DMACH5BurstConfig(Uint16 bsize, int16 srcbstep, int16 desbstep);
void DMACH5TransferConfig(Uint16 tsize, int16 srctstep, int16 deststep);
void DMACH5WrapConfig(Uint16 srcwsize, int16 srcwstep, Uint16 deswsize, int16 deswstep);
void DMACH5ModeConfig(Uint16 persel, Uint16 perinte, Uint16 oneshot, Uint16 cont, Uint16 synce, Uint16 syncsel, Uint16 ovrinte, Uint16 datasize, Uint16 chintmode, Uint16 chinte);
void StartDMACH5(void);
// DMA Channel 6
void DMACH6AddrConfig(volatile Uint16 *DMA_Dest,volatile Uint16 *DMA_Source);
void DMACH6BurstConfig(Uint16 bsize,Uint16 srcbstep, int16 desbstep);
void DMACH6TransferConfig(Uint16 tsize, int16 srctstep, int16 deststep);
void DMACH6WrapConfig(Uint16 srcwsize, int16 srcwstep, Uint16 deswsize, int16 deswstep);
void DMACH6ModeConfig(Uint16 persel, Uint16 perinte, Uint16 oneshot, Uint16 cont, Uint16 synce, Uint16 syncsel, Uint16 ovrinte, Uint16 datasize, Uint16 chintmode, Uint16 chinte);
void StartDMACH6(void);
  • 1
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值