Hi,
I write to a ring double buffer.
Each time I cross from one half Buffer to another (E.g. to Half-B), I transfer by a DMA the previous half-Buffer (E.g. Half-A) to a large memory.
Sometimes, it happens that the DMA works more slowly, and I therefore write faster to the Double Buffer (E.g. Half-B) than the DMA passes the previous Half-Buffer (E.g. Half-A) to the large memory.
At this case, when I cross again to Half-Buffer A, the DMA still transfers A to the large memory, and has ~25% left.
I'd like to "give it a chance" to finish transferring Half-Buffer A, and when it finishes, start transferring Half-B to the large Memory.
How would you manage it?
Thank you.