2015-02-13 12:41 PM
Hello, I am measuring voltage via ADC, using timer TRGO interrupt trgiggered DMA. After measuring 1000samples I need to stop, proces meassured data and then continue in meassuring. I stop timer by:
TIM_ITConfig(TIM3, TIM_IT_Update, DISABLE);and after data processing I run timer again by:TIM_ITConfig(TIM3, TIM_IT_Update, ENABLE);
But in debug after TIM_ITConfig(...., DISABLE); new samples are still coming and overwriting old samples. How is it possible when I stopped timer update? When I use: TIM_Cmd(TIM3, DISABLE); everything is OK, but I dont know if it is neccesary to turn off whole timer.... Thank you for answeres and ideas.
2015-02-13 01:07 PM
Turning off the timer update interrupt is not the same as turning off the timer, or the update.
The update, and the trigger are upstream from the AND gate for the interrupt enable logic.The counter enable would seem to be the best way to stop the count, if that in fact is what you want to happen.2015-02-14 02:26 AM
Thank you clive. I just want to stop triggering my ADC for a while.