AnsweredAssumed Answered

stm32f3 Initialize DMA Transfer Complete flag ?

Question asked by constant.colin on Jan 24, 2015
An odd question, maybe, but is it possible to initialize the DMAy_FLAG_TCx to true?  I have a routine that tests this 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 %06.1f %06.1f %06.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,