About STM32F103; Timer and Encoder
Hi Colleagues,
I am just trying STM32F103 using Encoder in TIM3. I am able to count the pulses and direction ; prima facie it looks fine.I am using the STM32 CubeIDE for configuring the parameters. I have a few questions though :
1) I need to compute the speed of the pulse.
Is it possible to use the same TIM3 in timer interrupt mode,viz with HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim) callback function and calculate the speed by measuring the difference in counts between timer interrupts.
Or is it possible to use the same TIM3 in Input Capture Direct mode without using any additional pins ?
2) Is there an interrupt generated whenever the CounterPeriod ARR overflows ?I could not locate the Callback function for this.
3)Is there a bit which indicates the direction of rotation ? I am using
EncoderCntr = TIM3->CNT; and the counts increment/decrement as expected.
4)How to calculate the maximum speed of the encoder before pulses start to get dropped while counting.
I was just hoping for some quick answers while I do my own digging into the docs :) !!
Cheers !