
Technical discussions about the TI C6000 DSPs (including the c62x, c64x and c67x DSPs).
|
Hi all. I am trying to transfer data from PC to DSP throught FIFO using DMA and Interrupt. And I'd like to process this data. On the PC, I used API fuction as the following .. evm6x_write( , , ); .. On the DSP, main() { run_DMA(); // dma setting set_interrupts(); // dma interrupt service routine *(volatile unsigned int *)0x01780018 =3; while(1) { if(INTFlag==1) { for(i=0; i<BufferSize; i++) out_buffer[i]= in_buffer[i]; INTFlag=0; } } } In this code, when DMA interrupt happens, ISR sets INTFLAG 1. in_buffer is the destination address of DMA. So data is transferred to this buffer. That's O.K. My problem!! To process this transferred data, I added some code as the following. while(1) { if(INTFlag==1) { for(i=0; i<BufferSize; i++) out_buffer[i]= in_buffer[i]; for(i=0; i<BufferSize; i++) ext_buffer[i]= out_buffer[i] + 1000; INTFlag=0; } } In this case, right data is transferred in in_buffer, but there is no data in out_buffer. Of course, there is also no data in ext_buffer. I'd like to transfer some data from PC to DSP and process it. Finally I want to save this data in external memory... Some problem in my understanding to use DMA or DSP code?? Any comments help me. thanks |