Question
how to update TIM_Period when timer i running
Posted on September 09, 2012 at 21:55
Hi
I need to be able to update the Period for a timer (TIM3) I though it was simple, but no.I have tried :else if(TIM_GetITStatus(TIM3, TIM_IT_Update) != RESET){ ledTimeBaseStructure.TIM_Period = newValue; TIM_TimeBaseInit(TIM3, &ledTimeBaseStructure); TIM_ClearITPendingBit(TIM3, TIM_IT_Update);}but without any look, the period should be around 1 sek, but it is around 1 – 2 ms.There must be a simple solution, so I hope any one can help, thanks/SPA