Question
Sync PWM timers together
Posted on March 09, 2016 at 12:23
Hello there,
I am trying to write a stepper motor driver on STM32F4 platform. I intend to use TIM1 (channel 1, 2 and 3) and TIM8 (channel 1) for driving the motor. I have noticed that after configuration the timers for center aligned PWM, the 1 channel from TIM8 is not in sync with other channels from TIM1. The pwm waves should be set at same position, but the wave from tim8 is with offset, not center aligned with channel 3, 2 or 1 from TIM1. I need to make TIM1 and TIM8 to work exacly in sync. Is that possible? I would really apreciate all help regarding this matter. EDIT: I have noticed that the offset is depending on how late i start TIM8 after TIM1. Is there a way for them to start at the same time?