2015-09-28 02:58 AM
Hello there,
I am trying to build a stepper motor driver with encoder interface using stm32F4 discovery board. I have already configured and got working the stepper motor interface. For that I used Timers 1 and 8 like in the picture bellow (2 H bridges): https://www.dropbox.com/s/31rrg5sldelfthn/Zrzut%20ekranu%202015-09-28%2011.49.10.png?dl=0 Now I would like to add the encoder interface which consists signals A and B. If I am reading the datasheet correctly for that I need timer 1 and 2. But timer 1 is also used for motor driving... Is there a way to overcome this and have both motor and encoder interfaces implemented? I would apreciate all help!2015-09-28 04:01 AM
For encoder interface you have to choose ''Encoder Mode'' under ''Combined channels'' menu. This will reserve 2 pins as inputs for A and B signals.
2015-09-28 04:16 AM
Thank you for you answer. So I dont have to use TIMER1 but just TIMER2 for the encoder?
2015-09-28 04:28 AM
2015-09-28 04:30 AM
Thats what I meant. The documentation made me thing I need 1 timer per channel. Thank you.