Hi, i have a problem:
I'm using C5515 eZdsp and i'm acquiring a signal from the codec using ping pong buffer as in Audio Filter demo.
I configured Codec in Mono mode, so the signals come only from Left channel.
I modified Audio Filter Demo code like this ( here is my code snippet that uses the Dsplib fir function:
while(1) { if (CurrentRxL_DMAChannel ==2) { buff_copy(&RcvL1[0],&Buffer[0],XMIT_BUFF_SIZE); fir((DATA*)&Buffer[0],&filter_coeffs[0],(DATA*)&Buffer[0],&dbuffer[0],XMIT_BUFF_SIZE,67); buff_copy(&Buffer[0],&FilterOutL1[0], XMIT_BUFF_SIZE); } else { buff_copy(&RcvL2[0],&Buffer[0],XMIT_BUFF_SIZE); fir((DATA*)&Buffer[0],&filter_coeffs[0],(DATA*)&Buffer[0],&dbuffer[0],XMIT_BUFF_SIZE,67); buff_copy(&Buffer[0],&FilterOutL2[0], XMIT_BUFF_SIZE); } } }
What's the problem: every time I switch the Dma channel the signal, seen with a scope, presents a glitch.
So, What can i do?
I have also disabled Right channel from in the DMA interrupt enable:
void enable_dma_int(void) { // interrupt order: TxL -> TxR -> RxL -> RxR // enable only TxR (channel 1) and RxR (channel 3). //DMA_MSK = 0x00F0; // enable DMA1, channel 3 and channel 1 interrupts DMA_MSK = 0x0005; // enable DMA interrupts DMA_IFR = 0xFFFF; // clear interrupt flags }
Any idea?
Thanks a lot in advance, every suggestion is very appreciated
Regards,
Paolo