cancel
Showing results for 
Search instead for 
Did you mean: 

stm32f3 Initialize DMA Transfer Complete flag ?

colinconstant
Associate II
Posted on January 24, 2015 at 07:30

An odd question, maybe, but is it possible to initialize the DMAy_FLAG_TCx to true? I have a routine that teststhis flag and then sends data, and I would like it to fall through the first time. I'd rather not have it do some kind of phony write at the start, although that does work.

Anyway, here's the little bit of code that does the test. I would just like DMA1_FLAG_TC7 to be true at startup.

if( DMA_GetFlagStatus( DMA1_FLAG_TC7 ) ) 
{ 
DMA_Cmd(DMA1_Channel7, DISABLE); 
DMA_ClearFlag( DMA1_FLAG_GL7 ); 
c = sprintf(RadioWriteBuffer, ''%5d %4d %1f %1f %1f\n'', msg_cnt++, loop_cnt, MagBuffer[0], MagBuffer[1], MagBuffer[2] ); 
DMA_SetCurrDataCounter ( DMA1_Channel7, c ); 
DMA_Cmd( DMA1_Channel7, ENABLE ); 
loop_cnt = 0; 
} 

Thanks everyone, Colin #dma
0 REPLIES 0