Could anyone explain how I could use Ping Pong buffers? I wasn't able to find any documentation on it.
What is the size of the Ping pong buffer?
Ping-Pong buffering is a programming technique that uses two buffers to speed up a processor that can overlap I/O with processing. Data in one buffer is being processed while the next set of data is read into the other one.
Many example code (like Block Based Audio Talkthrough example codes of ADSP-214xx processor family provided in the VDSP installation directory) have implemented the ping pong buffer technique. You can refer to the example code for the implementation.
The general procedure(using DMA) as implemented in the above example codes is to first setup two buffers, initialize TCB for each buffer ,each TCB having chain pointer address pointing to the other TCB and enabling the DMA chaining mode .
Also there is an option of Ping-Pong DMA in IDP. Please refer to Pg.No 617 of the ADSP-214xx Hardware Reference Manual for complete information. Here the ping-pong buffer parameters have two memory index values (index A and index B), one count value and one modifier value . The DMA starts the transfer with the memory indexed by A. When the transfer is completed as per the value in the count register, the DMA restarts with the memory location indexed by B. The DMA restarts with index A after the transfer to memory with index B is completed as per the count value. This repeats until the DMA is stopped by resetting the DMA enable bit .
Please let me know if you have further queries/doubts.
Retrieving data ...