Reply by diao...@126.com June 13, 20062006-06-13
hi,all
I use edma to move recived data form mcasp.mcasp give edma a event to drive edma to move

a element,and I want edma to move 128 elements(a frame) then trigger a interrupt to cpu.
but now I found every elements in a frame is the same.I think when edma recive a event from

mcasp, it move the same value 128 times to the frame buffer, and then call a interrupt.
but I cannot find out the error in the edma settings.please help me.

#define inSize 128
EDMA_Config cfgEdmaPing = {
EDMA_OPT_RMK( /* Making Options parameter register - EDMA_OPT */

EDMA_OPT_PRI_HIGH, /* Priority levels for EDMA events:-
EDMA_OPT_PRI_LOW - Low priority EDMA transfer
EDMA_OPT_PRI_HIGH - High priority EDMA transfer*/

EDMA_OPT_ESIZE_32BIT,/* Element size :-
EDMA_OPT_ESIZE_32BIT - 32 bit word
EDMA_OPT_ESIZE_16BIT - 16 bit word
EDMA_OPT_ESIZE_8BIT - 8 bit word */

EDMA_OPT_2DS_NO, /* Source dimension :-
EDMA_OPT_2DS_NO - 1-dimensional source
EDMA_OPT_2DS_YES - 2-dimensional source */

EDMA_OPT_SUM_NONE, /* Source address update mode :-
EDMA_OPT_SUM_NONE - Fixed address mode
EDMA_OPT_SUM_INC - Increment address mode
EDMA_OPT_SUM_DEC - Decrement address mode
EDMA_OPT_SUM_IDX - Address modified by element
index or frame Index */
EDMA_OPT_2DD_NO, /* Destination dimension :-
EDMA_OPT_2DD_NO - 1-dimensional source
EDMA_OPT_2DD_YES - 2-dimensional source */

EDMA_OPT_DUM_INC, /* Destination address update mode :-
EDMA_OPT_DUM_NONE - Fixed address mode
EDMA_OPT_DUM_INC - Increment address mode
EDMA_OPT_DUM_DEC - Decrement address mode
EDMA_OPT_DUM_IDX - Address modified by element
index or frame Index */

EDMA_OPT_TCINT_YES, /* Transfer complete interrupt :-
EDMA_OPT_TCINT_NO - Indication disabled
EDMA_OPT_TCINT_YES - Indication enabled */

EDMA_OPT_TCC_OF(TCCINTNUMR),/* Transfer complete code */

EDMA_OPT_LINK_YES, /* Linking of event parameters
EDMA_OPT_LINK_NO - Disabled
EDMA_OPT_LINK_YES - Enabled */

EDMA_OPT_FS_YES /* Frame synchronization
EDMA_OPT_FS_NO - Channel is element/array
synchronized
EDMA_OPT_FS_YES - Channel is frame synchronized*/
),
EDMA_SRC_OF(RBUF6),/* Source address register
&ping_data - source address */

/* Transfer count parameter */
EDMA_CNT_OF(inSize), /* BUFF_SZ - buffer sizes in # of ints */

/* Destination address parameter*/
EDMA_DST_OF(&ping), /*ping - destination address */

EDMA_IDX_RMK(
EDMA_IDX_FRMIDX_OF(0),
EDMA_IDX_ELEIDX_OF(0)
),/* Index parameter */

EDMA_RLD_OF(0x00000000) /* Count reload/link parameter */
};

thanks