AnsweredAssumed Answered

Sharc 21489 ping pong dma synchronization

Question asked by QuentinBerthet on Dec 17, 2014
Latest reply on Jun 4, 2015 by Harshit.Gaharwar



I have issue in a project on a custom board with ADSP21489:


I try to adapt a talkthru C example to my board (Chained DMA with ping pong buffer). The problem is that I get some periodic corrupted sample on the output. The interesting point is that if I stop the debug session (terminate and remove), then the system run correctly without corruption.


I suspect that this have something to do with my output DMA being de-synchronized with the input DMA and copying output buffer while it is written by the (very basic) process loop, but I can't figure how to ensure synchronization and why the system run correctly after disconnecting is a mystery for me.


The main modification from the talkthru example are:

- SPORT0 used as a slave I2S input driven by the I2S incoming clocks (96khz)

- SPORT3 used as a slave I2S output driven by the PCG

- PCG used to generate I2S word clock (96khz) and bit clock from an external 24.576mhz master clock


I am using CrossCore Studio version and ADZS-USB-ICE as emulator.


I join an example that reproduce the issue on my hardware, maybe someone can spot the mistake.


Any help greatly appreciated !