DSPRelated.com
Forums

using csl for edma

Started by ahmadagha23 June 28, 2005
hi friends
I use the below program for setting up edma only by using csl
library.
it have been builds without any error.when i run its run time
message
says that the target cant do priority 0 in qui edma. when i debuge
the code I understand that the numbers that are defined in edmacfg0
config are not save to the related location in PaRAm but also the
different numbers are saved at 0x01a0060 PaRAM (the other locations
in PaRAM don't change).in other words the number at edmacfg0
structure changed.(when I check the &edmacfg0 address its memory
contains where different from my defined numbers in edmacfg0
structure; for example the number 0x31350000 had been changed to a
number like 0x1800006a).
Do you know why? what can I do? the source C code: #include <csl.h>
#include <csl_edma.h>
#include <csl_dma.h>

extern far EDMA_Config edmaCfg0;
extern far EDMA_Handle hEdmaTbl0;

EDMA_Handle hEdmaCha4;
EDMA_Handle hEdmaTbl0;

EDMA_Config edmaCfg0 = {
0x31350000, /* Option */
0x00000000, /* Source Address - Numeric */
0x00000004, /* Transfer Counter - Numeric */
0x00001000, /* Destination Address - Numeric */
0x00000000, /* Index register - Numeric */
0x00000000 /* Element Count Reload and Link Address */
};

void CSL_cfgInit()
{

hEdmaCha4 = EDMA_open(EDMA_CHA_EXTINT4, EDMA_OPEN_RESET);
hEdmaTbl0 = EDMA_allocTable( 0);
EDMA_config(hEdmaCha4, &edmaCfg0);
EDMA_enableChannel(hEdmaCha4);
EDMA_setChannel(hEdmaCha4);
EDMA_config(hEdmaTbl0, &edmaCfg0);
}

void main()
{
CSL_cfgInit();
EDMA_setChannel(hEdmaCha4);
while(1);
}