2015-01-23 10:30 PM
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