cancel
Showing results for 
Search instead for 
Did you mean: 

stm32f103: synchronize a few timers

domanski0karol
Associate III
Posted on July 18, 2016 at 23:28

Hi, I would like to control a brushless motor in gimbal project for this purpose I use three timers, but diffrent to one motor and I prepare timers as a PWM output and set a pulse which is out of phase, but because of I use different timers I dont have a good synchronization, how can I synchronize three timers TIM3->CCR1, TIM2->CCR4, TIM2->CCR3? 

1 REPLY 1
Posted on July 19, 2016 at 00:55

That would appear to describe TWO timers, each timer only has a single counting element, CNT, describing the current phase-angle of the timer across the period. The phase difference between CCR3 and CCR4 is in units of the baseline tick, defined by the APB/TIM CLK and the Prescaler.

You can put timers in a slave mode, and have them reset on an input trigger. You'd have to pick slave timers and configurations which share a common master so they all reset together.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..