cancel
Showing results for 
Search instead for 
Did you mean: 

STM32G431: control 4 stepper motors with TIM1's 4 PWM channels?

TwelveSquared
Senior

I'm considering STM32G431 for a motor control project with 4 stepper motors driven by step and direction.

Can all 4 steppers be controlled by using TIM1's four PWM Generation channels 1 thru 4 and be made to move by different amounts of pulses simultaneousy?

Or do I need to use a separate TIMx for each motor, e.g., TIM1, TIM8, TIM2, TIM3?

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Guru

You need a separate timer for each motor, unless you want them all to move at the same speed.

If you feel a post has answered your question, please click "Accept as Solution".

View solution in original post

2 REPLIES 2
TDK
Guru

You need a separate timer for each motor, unless you want them all to move at the same speed.

If you feel a post has answered your question, please click "Accept as Solution".
TwelveSquared
Senior

@TDK​ thank you!