AnsweredAssumed Answered

STM32F4 Discovery Stepper Motor control problem

Question asked by Marylou on Feb 6, 2016
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!