cancel
Showing results for 
Search instead for 
Did you mean: 

DMA double buffering

chichvarin
Associate II
Posted on May 17, 2012 at 15:33

Hi everyone. While reading ST technical documentation i haven't realised whether there exists a simple way to find out which one of buffers is in use in interrupt routine without keeping count, some reliable way?

Thanks 

#dma-double-buffer-memory-target
2 REPLIES 2
raffael
Associate II
Posted on May 21, 2012 at 09:04

Hello,

I'm using the following command to determine which memory block has to be processed:

DMA_GetCurrentMemoryTarget

if( DMA_GetCurrentMemoryTarget(DMA2_Stream0) == 0 ) {

   ...

} else {

   ...

}

Best.

chichvarin
Associate II
Posted on May 21, 2012 at 16:41

Thank you very much for your advice. It's very helpfull!