DSPRelated.com
Forums

trouble use EDMA interrupt

Started by diao...@126.com June 2, 2006
hi all:
I have some troubles to use my EDMA of C6713 to recive and transmit my audio signal.
I use edma to recieve and transmit my audio signal frames (128 points) independently. I hope each operation (R and X) give me a interrupt after done.and I give them different TCINTNUM.
cause the edma has only one interrupt event,so when the programme run to the interrupt service function,how can I now which operation it according to(recive done or transmit done)?(when I chek the CIPR ,both is set to 1)
beside I met another problem.I use the edma to put the frame to ping_buffer,and check it at the watch window,it is ok,then I use function
memcpy()to copy the frame to another buffer(buffer2),but the result is totally wrong,all the element (128 in all)in the buffer2 is the same.but the result from micphone is still ok.is it the bug of ccs?
thank you for your precious advices.
Regards
yiping
d...@126.com wrote:

>hi all:
> I have some troubles to use my EDMA of C6713 to recive and transmit my audio signal.
> I use edma to recieve and transmit my audio signal frames (128 points) independently. I hope each operation (R and X) give me a interrupt after done.and I give them different TCINTNUM.
>cause the edma has only one interrupt event,so when the programme run to the interrupt service function,how can I now which operation it according to(recive done or transmit done)?(when I chek the CIPR ,both is set to 1)
>
>
Is it possible that both EDMA transfers completed at the same time ? I
would expect that to be the case. There is some TI documentation in
SPRA636.PDF , pg29 showing the correct sequence for handling an EDMA
interrupt.

> beside I met another problem.I use the edma to put the frame to ping_buffer,and check it at the watch window,it is ok,then I use function
>memcpy()to copy the frame to another buffer(buffer2),but the result is totally wrong,all the element (128 in all)in the buffer2 is the same.but the result from micphone is still ok.is it the bug of ccs?
> thank you for your precious advices.
>
>
If you have caching turned on, you may need to call CACHE_clean() to be
sure the data is written to external memory.

- Andrew E.

>
>Regards
>yiping
>
>
>
hi Andrew .E and everyone:
thank you for your help,but I am still in the trouble.
I do not use the cashe yet. now I use the edma to transfer the frame to buffer1(128 int elements).after transfer done.it goes to the service function.
in the service function,I copy the frame to buffer2,I use another channel of edma to move the frame to mcasp to transmit.when the programe run,the out_sound
is ok,and I use "breakpoint and watch window"to check the contents of the buffer, buffer 1 is ok, but there're problems in buffer2.every elements in buffer2 is the same.I don't know why.
I think it is not the bug of "watch " tool.beacause I change the EDMA_OPT_SUM
value in tramsmit channel to 'EDMA_OPT_SUM_NONE'(orignal set is 'EDMA_OPT_SUM_INC'for buffer2 , 'EDMA_OPT_DUM_NONE' for Xbuf of mcasp),it still works.
so can you give me some advise? and can you give me some good method build your driver program.(frame in ,processe , frame out).Dose it nessassry to use ping-pong and cache? I really confused.

Regards
yiping










-----ԭʼ-----
:"Andrew Elder"
ʱ2006-06-02 21:08:36
:d...@126.com
:c...
:Re: [c6x] trouble use EDMA interrupt
d...@126.com wrote:

>hi all:
> I have some troubles to use my EDMA of C6713 to recive and transmit my audio signal.
> I use edma to recieve and transmit my audio signal frames (128 points) independently. I hope each operation (R and X) give me a interrupt after done.and I give them different TCINTNUM.
>cause the edma has only one interrupt event,so when the programme run to the interrupt service function,how can I now which operation it according to(recive done or transmit done)?(when I chek the CIPR ,both is set to 1)
>
>
Is it possible that both EDMA transfers completed at the same time ? I
would expect that to be the case. There is some TI documentation in
SPRA636.PDF , pg29 showing the correct sequence for handling an EDMA
interrupt.

> beside I met another problem.I use the edma to put the frame to ping_buffer,and check it at the watch window,it is ok,then I use function
>memcpy()to copy the frame to another buffer(buffer2),but the result is totally wrong,all the element (128 in all)in the buffer2 is the same.but the result from micphone is still ok.is it the bug of ccs?
> thank you for your precious advices.
>
>
If you have caching turned on, you may need to call CACHE_clean() to be
sure the data is written to external memory.

- Andrew E.

>
>Regards
>yiping