資源簡介
關(guān)于TMS320C6713芯片的EDMA程序,還是很有用的。

代碼片段和文件信息
/*********************************************************************************
*?Copyright 2003?by?SEED?Electronic?Technology?Ltd.
*?All?rights?reserved.?Property?of?SEED?Electronic?Technology?Ltd. ????????????????*
*?Designed?by: Hongshuai.Li ????????????????????????????????*
*********************************************************************************/?
/*?FILENAME......?DEC6713_EDMA.c
*?DATE?CREATED..?21/12/2004
*?LAST?MODIFIED.?21/12/2004
*------------------------------------------------------------------------------
*?This?program?uses?the?timer?to?trigger?EDMA?events.?These?events?in?turn?
*?trigger?linked?EDMA?parameter?tables?to?fill?a?ping?pong?buffer?structure.?
*?On?running?the?program?you‘ll?note?that?the?program?bounces?between?the?ping?
*?and?pong?buffers?filling?each?with?a?value?that?comes?from?the?source.??
*?(Note:?This?example?runs?with?CACHE?enable).?
\******************************************************************************/
#include?
#include?
#include?
#include?
#include?
#include?
#include?
/*----------------------------------------------------------------------------*/
/*?Pick?which?EDMA?transfer?completion?interrupt?we?want?to?use?*/
#define?TCCINTNUM???10
/*?define?the?constants?*/
#define?BUFF_SZ??????256??????????????/*?ping-pong?buffer?sizes?in?#?of?ints??*/
#define?FCPU?????????150000000????????/*?CPU?clock?frequency??????????????????*/
#define?SRATE????????8000?????????????/*?data?sample?rate?(simulated?w/timer??*/
#define?TPRD?????????(FCPU/(4*SRATE))?/*?timer?period?????????????????????????*/
#define?TRANSFER_CNT?20???????????????/*?Transfer?count?*/
/*?Create?the?buffers.?We?want?to?align?the?buffers?to?be?cache?friendly?*/
/*?by?aligning?them?on?an?L2?cache?line?boundary.????????????????????????*/
#pragma?DATA_ALIGN(ping128);
#pragma?DATA_ALIGN(pong128);
#pragma?DATA_ALIGN(outbuff128);
int?ping[BUFF_SZ];
int?pong[BUFF_SZ];
int?outbuff[BUFF_SZ];
/*?These?two?variables?serve?as?the?data?sources?for?this?example.?*/
/*?Also?want?to?align?these?on?a?cache?line?boundary?since?they????*/
/*?sources?of?EDMA?transfers.??????????????????????????????????????*/
#pragma?DATA_ALIGN(ping_data128);
#pragma?DATA_ALIGN(pong_data128);
static?int?ping_data;
static?int?pong_data;
/*?global?variable?used?to?track?the?ping-pong‘ing?*/
static?int?pingpong?=?0;
volatile?int?transferCount?=?0;
extern?far?void?vectors();
void?setupInterrupts(void);
void?stopEdma(void);?/*?function?used?to?stop?EDMA?*/
/*-------------------------------------------------------------------------*/
/*?declare?the?CSL?objects?*/
TIMER_Handle?hTimer;???/*?Handle?for?the?timer?device?????????????????*/
EDMA_Handle?hEdma;?????/*?Handle?for?the?EDMA?channel?????????????????*/
EDMA_Handle?hEdmaPing;?/*?Handle?for?the?ping?EDMA?reload?parameters??*/
EDMA_Handle?hEdmaPong;?/*?Handle?for?t
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????670??2005-01-31?10:35??DEC6713_EDMA\cc_build_Debug.log
?????文件???????4908??2005-01-31?10:35??DEC6713_EDMA\Debug\DEC6713.obj
?????文件??????20396??2005-01-31?10:35??DEC6713_EDMA\Debug\DEC6713_EDMA.map
?????文件??????14387??2005-01-31?10:35??DEC6713_EDMA\Debug\DEC6713_EDMA.obj
?????文件??????84484??2005-01-31?10:35??DEC6713_EDMA\Debug\DEC6713_EDMA.out
?????文件???????2758??2005-01-31?10:35??DEC6713_EDMA\Debug\vecs.obj
?????目錄??????????0??2006-06-27?11:54??DEC6713_EDMA\Debug
?????文件????????528??2005-01-31?10:35??DEC6713_EDMA\Debug.lkf
?????文件????????528??2005-01-31?10:35??DEC6713_EDMA\Debug.lkv
?????文件???????6525??2004-12-03?15:52??DEC6713_EDMA\DEC6713.C
?????文件??????13299??2004-10-28?16:09??DEC6713_EDMA\DEC6713.gel
?????文件??????17819??2006-03-17?16:25??DEC6713_EDMA\DEC6713_EDMA.c
?????文件???????4902??2005-01-31?16:21??DEC6713_EDMA\DEC6713_EDMA.paf
?????文件???????1059??2005-01-31?10:36??DEC6713_EDMA\DEC6713_EDMA.pjt
?????文件???????9020??2004-12-21?14:54??DEC6713_EDMA\DEC6713_EDMA.wks
?????文件????????812??2004-12-21?13:15??DEC6713_EDMA\edma.cmd
?????文件???????1088??2004-12-21?10:18??DEC6713_EDMA\include\DEC6713.h
?????目錄??????????0??2006-06-27?11:54??DEC6713_EDMA\include
?????文件???????3450??2004-12-21?13:15??DEC6713_EDMA\vecs.asm
?????目錄??????????0??2006-06-27?11:54??DEC6713_EDMA
-----------?---------??----------?-----??----
???????????????186633????????????????????20
- 上一篇:基于DS1302的4位LED滾動日歷
- 下一篇:PB API文件屬性設(shè)置
評論
共有 條評論