Motor speed estimation using TIM2 and TIM3 on STM32F407
I'm trying to connect an encoder with STM32F407VGT6. The encoder sends out A,B and Z pulses out. I can read both A-B and Z pulses using TIM2 and TIM3 respectively. Timer 2 is in encoder mode and TIM3 is in input PWM mode.
I want to know if I'm correct:
A-B encoder signals give me the rotation data
and
Z signal will give out pulse with variable frequency.
If I read the time period saved in CCR1/CCR2 of TIM3, can I estimate the speed of the motor? If yes, how?
