Quadrature encoder integration
Hi there
I am trying to integrate a quadrature encoder using STM32 cortex m mcus.
I could not get enough clearance reading the manual several times. I don't have an oscilloscope, which is why I need to rely on specifications rather than trial and error.
So far, i have been able to run the Tim/encoder example code to read the direction of turn (tim3 on stm32f401re).
What I want to do is to
1) read the relative position since beginning (tim3 or timx /= tim3?)
2) use a secondary timer to read frequency of the square wave to derive speed with hardware (tim4) counting. I have read the example on input capture for pwm input, but I only need the frequency and the master slave is done inside the same timer there. I want to make tim4 slave to tim3
OR
Should I simply attach the same encoder signal additionally to a Tim 4 pin directly and get rid of master slave conf?
3) similarly derive acceleration (tim4 or tim5)
4) do all that as precise as possible with the given hardware
Here are my questions..
1) Can the timer which uses the encoder mode to get direction (which disables use of slave/master conf for other uses) be also used to get the relative position?
OR
do I need to use a separate second timer for position as well?
2) how can I setup a timer as a slave in depicted cases?
Any help is much appreciated!
Best regards
