dm642,edma搬运测试失败。。。。求助
时间:10-02
整理:3721RD
点击:
一个edma搬运数据的程序段,放在一个工程A中,可以用。但是转到工程B中,edma搬运用不了了。然后我将两个程序的build option 以及bios设置,头文件都写成一样的了,但是edma在工程B中还是用不了,,,我贴下代码,求大神帮忙!(两个工程都用了bios)
1.包含edma初始化及cpu触发函数等的一个c文件。
- #include
- #include
- unsigned int TESTSRC[32]=
- {
- 0x12345678,0x87654321,0x12345678,0x87654321,
- 0x12345678,0x87654321,0x12345678,0x87654321,
- 0x12345678,0x87654321,0x12345678,0x87654321,
- 0x12345678,0x87654321,0x12345678,0x87654321,
- 0x12345678,0x87654321,0x12345678,0x87654321,
- 0x12345678,0x87654321,0x12345678,0x87654321,
- 0x12345678,0x87654321,0x12345678,0x87654321,
- 0x12345678,0x87654321,0x12345678,0x87654321,
- };
- unsigned int TESTDST[32]=
- {
- 0x00000000,0x00000000,0x00000000,0x00000000,
- 0x00000000,0x00000000,0x00000000,0x00000000,
- 0x00000000,0x00000000,0x00000000,0x00000000,
- 0x00000000,0x00000000,0x00000000,0x00000000,
- 0x00000000,0x00000000,0x00000000,0x00000000,
- 0x00000000,0x00000000,0x00000000,0x00000000,
- 0x00000000,0x00000000,0x00000000,0x00000000,
- 0x00000000,0x00000000,0x00000000,0x00000000,
- };
- static EDMA_Handle hEdmaNewApply;
- void TEST_One_Edma()
- {
- unsigned int i;
- Uint32 disi=0;
- Uint32 tcc,src;
- EDMA_Handle hEdma;
- EDMA_Config cfgEdma;
- tcc=EDMA_intAlloc(-1);
- assert(tcc != -1);
- hEdma = EDMA_open(tcc,EDMA_OPEN_RESET);
- assert(hEdma != EDMA_HINV);
- hEdmaNewApply=hEdma;
- /** Make EDMA parameters OPT **/
- cfgEdma.opt=EDMA_OPT_RMK(
- EDMA_OPT_PRI_LOW, //MEDIUM
- EDMA_OPT_ESIZE_32BIT,
- EDMA_OPT_2DS_YES,
- EDMA_OPT_SUM_INC,
- EDMA_OPT_2DD_YES,
- EDMA_OPT_DUM_INC,
- EDMA_OPT_TCINT_NO,//(i== EVT_Y ? EDMA_OPT_TCINT_YES:EDMA_OPT_TCINT_NO),//only event Y generate interrupt
- EDMA_OPT_TCC_OF(8),
- EDMA_OPT_TCCM_OF(0),
- EDMA_OPT_ATCINT_NO,
- EDMA_OPT_ATCC_OF(0),
- EDMA_OPT_PDTS_DISABLE,
- EDMA_OPT_PDTD_DISABLE,
- EDMA_OPT_LINK_NO,//NOTE!
- EDMA_OPT_FS_YES );//array sync
- cfgEdma.src = (Uint32) TESTSRC;
- cfgEdma.cnt = EDMA_CNT_RMK(1,4);//dchan->numLines-1
- cfgEdma.dst = (Uint32) TESTDST;
- cfgEdma.idx = EDMA_IDX_RMK(0,0);//pitch
- cfgEdma.rld = EDMA_RLD_RMK(0,0);
- /** Configure EDMA parameters **/
- EDMA_config(hEdma,&cfgEdma);
- EDMA_disableChannel(hEdma);
- EDMA_clearChannel(hEdma);
- EDMA_enableChannel(hEdma);
-
- }
- void Trigger_the_testEDMA()
- {
- Uint32 src,dst;
- Uint32 *P,*P1;
- static Uint8 ii=0;
- P=TESTSRC;
- P1=TESTDST;
- ii++;
- if(ii>=4)
- ii=0;
- for(src=0;src
- #include
- #include
- #include
- #include
- #include "dm642param.h"
-
- void main()
- {
- CSL_init();
- TEST_One_Edma();
- }
各位大神,小弟已经纠结了5天了,谁来帮帮忙!非常感谢!
看看看看看看看看,看看看看看看看看
请问现在您还在弄dm642的板子没,不知道你现在会不会dsp和fpga的通信