Altera_Forum
Honored Contributor
14 years agoPing-Pong Buffer with SGDMA
Hi,
I would like to implement a SGDMA (stream-to-memory) to store blocks of sampled data in internal memory for signal processing. The implementation should be a PING-PONG-Buffer, so that one block can be processed while the other one is being filled again. I managed to implement two descriptors which are linked so that the first one points to the second one and vice versa. This works fine. However, the problem is, how can I verify which of the two buffers causes the interrupt? From the register maps I can't see any difference and the next_descriptor_pointer always shows 0x0. I'm afraid I loose synchronization in case I miss one IRQ. Has anybody an idea how to ensure the full buffer is being processed? Thanks and regards Michael