Introduction - If you have any usage issues, please Google them yourself
This example shows how to configure the TIM peripheral to interface with a encoder sensor.
The TIM3 is configured in encoder mode1: Counter counts up/down on TI2 rising edge
depending on TI1 level