DSPRelated.com
Forums

Help:EDMA Interrupt Problem

Started by hbd7...@yahoo.com.cn May 7, 2008
Hi everyone:

I am using the 6713DSK.
When I am testing the code provided by TI Application Report:TMS320C6000 McBSP UART(SPRA633B), it runs successfully. Sending ,no problem,receiving,
no problem. But it seems that sending and receiving only perform once.when I am waiting another datas sending from Pc,interrupt doesn't work! why?
Can it start automatically after I clear the bit in CIPR?
the Interrupt routine is as follow

interrupt void c_int08(void)
{
#if (EDMA_SUPPORT)
if (EDMA_intTest(14))
{
EDMA_intClear(14);
transmit_done = TRUE;
printf("Transmit Completed\n");
}

if (EDMA_intTest(15))
{
EDMA_intClear(15);
receive_done = TRUE;
printf("Receive Completed\n\n");
}
#endif
}

According to the data sheet ,
To configure the EDMA for any channel (or QDMA request) to interrupt the
CPU:
Set CIEn to ‘1’ in the CIER
Set TCINT to ‘1’ in channel options
Set Transfer Complete Code to n in channel options

I find that my EDMA configration is correct,but what should I do if I want to transmite and receive arrays continuously? Any help or suggettion would be appriciated! Thanks!
Hi,

I'm using this:

if ((EDMA_RGET(CIPR)&(0x1<<14))!=0) {
EDMA_RSET(CIPR,(0x1<<14));
transmit_done1 = TRUE;
}
if ((EDMA_RGET(CIPR)&(0x1<<15))!=0) {
EDMA_RSET(CIPR,(0x1<<15));
handle_receive1();
}

But I think it is the same as yours.

Check if you EDMA channels are reloaded after you received the 1st byte.
You do this by linking them with a copy of the original settings.

Have you tried sending more than one byte from DSP to PC?

HTH

Gustl
h...@yahoo.com.cn schrieb:
> Hi everyone:
>
> I am using the 6713DSK.
> When I am testing the code provided by TI Application Report:TMS320C6000 McBSP UART(SPRA633B), it runs successfully. Sending ,no problem,receiving,
> no problem. But it seems that sending and receiving only perform once.when I am waiting another datas sending from Pc,interrupt doesn't work! why?
> Can it start automatically after I clear the bit in CIPR?
> the Interrupt routine is as follow
> interrupt void c_int08(void)
> {
> #if (EDMA_SUPPORT)
> if (EDMA_intTest(14))
> {
> EDMA_intClear(14);
> transmit_done = TRUE;
> printf("Transmit Completed\n");
> }
>
> if (EDMA_intTest(15))
> {
> EDMA_intClear(15);
> receive_done = TRUE;
> printf("Receive Completed\n\n");
> }
> #endif
> }
> According to the data sheet ,
> To configure the EDMA for any channel (or QDMA request) to interrupt the
> CPU:
> Set CIEn to ?1? in the CIER
> Set TCINT to ?1? in channel options
> Set Transfer Complete Code to n in channel options
>
> I find that my EDMA configration is correct,but what should I do if I want to transmite and receive arrays continuously? Any help or suggettion would be appriciated! Thanks!
Thank you for your reply.
yes,I think your code is the same as mine,and my dsp can send more than one bytes to PC,but I still can't figure out how to check if edma is reloaded. Could you tell me in detail?
Hi everyone:
>
>I am using the 6713DSK.
>When I am testing the code provided by TI Application Report:TMS320C6000 McBSP UART(SPRA633B), it runs successfully. Sending ,no problem,receiving,
>no problem. But it seems that sending and receiving only perform once.when I am waiting another datas sending from Pc,interrupt doesn't work! why?
>Can it start automatically after I clear the bit in CIPR?
>the Interrupt routine is as follow
>interrupt void c_int08(void)
>{
> #if (EDMA_SUPPORT)
> if (EDMA_intTest(14))
> {
> EDMA_intClear(14);
> transmit_done = TRUE;
> printf("Transmit Completed\n");
> }
>
> if (EDMA_intTest(15))
> {
> EDMA_intClear(15);
> receive_done = TRUE;
> printf("Receive Completed\n\n");
> }
> #endif
>}
>According to the data sheet ,
>To configure the EDMA for any channel (or QDMA request) to interrupt the
>CPU:
>Set CIEn to ‘1’ in the CIER
>Set TCINT to ‘1’ in channel options
>Set Transfer Complete Code to n in channel options
>
>I find that my EDMA configration is correct,but what should I do if I want to transmite and receive arrays continuously? Any help or suggettion would be appriciated! Thanks!

my edma configuration is :
EDMA_OPT_RMK(
EDMA_OPT_PRI_HIGH, /* 1 */
EDMA_OPT_ESIZE_16BIT, /* 01 */
EDMA_OPT_2DS_NO, /* 0 */
EDMA_OPT_SUM_INC, /* 01 */
EDMA_OPT_2DD_NO, /* 0 */
EDMA_OPT_DUM_NONE, /* 00 */
EDMA_OPT_TCINT_YES, /* 1 */
EDMA_OPT_TCC_OF(14), /* 14 */
EDMA_OPT_LINK_NO, /* 0 */
EDMA_OPT_FS_NO /* 0 */
),
#endif

/* SRC Setup */
EDMA_SRC_RMK((Uint32) xmitbuf), /*xmitbuf address*/

/* CNT Setup */
EDMA_CNT_RMK(
EDMA_CNT_FRMCNT_DEFAULT,
EDMA_CNT_ELECNT_OF(BUFFER_SIZE*11)
),

/* DST Setup */
EDMA_DST_RMK(MCBSP_getXmtAddr(hMcbsp1)),

/* IDX Setup */
EDMA_IDX_RMK(0,0),

/* RLD Setup */
EDMA_RLD_RMK(0,0)
);
//////////////////////////////////////////////////////////
I found
EDMA_RLD_RMK(0,0);
EDMA_CNT_ELECNT_OF(BUFFER_SIZE*11) buffersize7;
Is there any element count or reload problem?
Hi,

you set LINK to NO in the option register. So the EDMA transfer is
performed just once. Either you reload you configuration manually after
each byte you received, or you let the EDMA controller do it for you.
Read 'Linking EDMA Transfers' in the 'EDMA Controller' section of the
data sheet.

HTH

Gustl
h...@yahoo.com.cn schrieb:
> my edma configuration is :
> EDMA_OPT_RMK(
> EDMA_OPT_PRI_HIGH, /* 1 */
> EDMA_OPT_ESIZE_16BIT, /* 01 */
> EDMA_OPT_2DS_NO, /* 0 */
> EDMA_OPT_SUM_INC, /* 01 */
> EDMA_OPT_2DD_NO, /* 0 */
> EDMA_OPT_DUM_NONE, /* 00 */
> EDMA_OPT_TCINT_YES, /* 1 */
> EDMA_OPT_TCC_OF(14), /* 14 */
> EDMA_OPT_LINK_NO, /* 0 */
> EDMA_OPT_FS_NO /* 0 */
> ),
> #endif
>
> /* SRC Setup */
> EDMA_SRC_RMK((Uint32) xmitbuf), /*xmitbuf address*/
>
> /* CNT Setup */
> EDMA_CNT_RMK(
> EDMA_CNT_FRMCNT_DEFAULT,
> EDMA_CNT_ELECNT_OF(BUFFER_SIZE*11)
> ),
>
> /* DST Setup */
> EDMA_DST_RMK(MCBSP_getXmtAddr(hMcbsp1)),
>
> /* IDX Setup */
> EDMA_IDX_RMK(0,0),
>
> /* RLD Setup */
> EDMA_RLD_RMK(0,0)
> );
> //////////////////////////////////////////////////////////
> I found
> EDMA_RLD_RMK(0,0);
> EDMA_CNT_ELECNT_OF(BUFFER_SIZE*11) buffersize7;
> Is there any element count or reload problem?