cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F4 Discovery Stepper Motor control problem

cibernetica-mente
Associate
Posted on February 06, 2016 at 20:41

Hi everyone,

I have to control a 4-phase step motor, I control it by only one timer (TIM4) and everythings works fine... until I change the period at run time... It sometimes changes direction of rotation, and I suppose it's due to a loss of clock cycle while resetting preferences.

The function called by some thread and has to change the motor speed, the speed is effectively changed... but sometime also the direction!

I really don't know how to avoid this, I hope you can help!

UPDATE: I solved the problem by enabling TIMx interruptions!

flight

flight

flight

0 REPLIES 0