2309 views|0 replies

3836

Posts

19

Resources
The OP
 

TMS320F28335 Study Notes——DMA [Copy link]

The SPR530 (C2833x/C2823x C/C++ header files and peripheral examples) provided by TI makes it very convenient for us to use the peripherals of 2833X and 2823X. Here is a description of the functions it defines.
// $TI Release: DSP2833x Header Files V1.10 $
// $Release Date: February 15, 2008 $
//**************Defined in DSP2833x_Adc.c, 1 function in total******************************//
void InitAdc(void);//Defined in DSP2833x_Adc.c, initialize ADC, enable ADCCLK, call in ADC factory calibration data, and power on.
//**************Defined in DSP2833x_DMA.c, 37 functions in total**************************//
void DMAInitialize(void);//Execute DMA hardware reset, set DMA to be unaffected by the emulator. 。
// DMA Channel 1
void DMACH1AddrConfig(volatile Uint16 *DMA_Dest,volatile Uint16 *DMA_Source);
//Set the source and destination of DMA
void DMACH1BurstConfig(Uint16 bsize, int16 srcbstep, int16 desbstep);
//Set the number of bytes per Burst, source address increment, and destination address increment. Note that for 28335, BYTE and WORD are the same, both are 16BIT.
void DMACH1TransferConfig(Uint16 tsize, int16 srctstep, int16 deststep);
//Set the number of bursts in each transfer, the interrupt after the transfer is completed, the source address increment, the destination address increment
void DMACH1WrapConfig(Uint16 srcwsize, int16 srcwstep, Uint16 deswsize, int16 deswstep);
//Set the source address and destination address after the transfer is completed
void DMACH1ModeConfig(Uint16 persel, Uint16 perinte, Uint16 oneshot, Uint16 cont, Uint16 synce, Uint16 syncsel, Uint16 ovrinte, Uint16 datasize, Uint16 chintmode, Uint16 chinte);
//Set the DMA working mode, including trigger source, whether to enable trigger source, whether to enable oneshot mode, whether to enable continuous mode, whether to enable peripheral device synchronization, select synchronization mode, overflow interrupt, etc. )
Parameter Description:
persel--Select the trigger source, the value is the following options
DMA_SEQ1INT--------ADC
DMA_SEQ2INT--------ADC
DMA_XINT1 ---------External interrupt
DMA_XINT2
---------External interrupt DMA_XINT3 ---------External interrupt
DMA_XINT4 ---------External interrupt
DMA_XINT5 ---------External interrupt
DMA_XINT6 ---------External interrupt
DMA_XINT7 ---------
External interrupt DMA_XINT13 ---------External interrupt
DMA_TINT0 ---------CPU clock
DMA_TINT1 ---------CPU clock
DMA_TINT2 ---------CPU clock
DMA_MXEVTA ---------McBSP-A
DMA_MREVTA --------McBSP-A
DMA_MXREVTB --------McBSP-B
DMA_MREVTB --------McBSP-B
perinte--Enable trigger source, value is PERINT_DISABLE or PERINT_ENABLE
oneshot--Enable oneshot mode, value is ONESHOT_DISABLE or ONESHOT_ENABLE. In this mode, one trigger completes all bursts.
cont--Enable Continuous mode, value is CONT_DISABLE or CONT_ENABLE. In this mode, DMA is reinitialized after the transfer is completed and waits for the trigger source.
synce--Enable peripheral synchronization, value is SYNC_DISABLE or SYNC_ENABLE.
syncsel--Synchronization selection. Value is SYNC_SRC or SYNC_DST.
ovrinte--Enable overflow interrupt. Value is OVRFLOW_DISABLE or OVEFLOW_ENABLE.
datasize--The number of bits to be transferred each time. The value is SIXTEEN_BIT or THIRTYTWO_BIT.
chintmode--Channel interrupt generation mode. CHINT_BEGIN: Interrupt is sent when the transfer starts. CHINT_END: Interrupt is sent when the transfer ends.
chinte--Enable channel interrupt. The value is CHINT_DISABLE or CHINT_ENABLE.
void StartDMACH1(void);
//Start DMACH1
//The functions of the DMA of the other 5 channels have the same meaning
// 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 desw step);
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, in t16 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 des wsize, 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 src wstep, 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, int1 6 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);

This post is from Microcontroller MCU
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list