English
Language : 

RM0313 Datasheet, PDF (324/900 Pages) STMicroelectronics – This reference manual targets application developers
General-purpose timers (TIM2 to TIM5, TIM19)
RM0313
Figure 87. Example of counter operation in encoder interface mode
IRUZDUG
MLWWHU
EDFNZDUG
MLWWHU
IRUZDUG
7,
7,
&RXQWHU
XS
GRZQ
XS
069
Figure 88 gives an example of counter behavior when TI1FP1 polarity is inverted (same
configuration as above except CC1P=1).
Figure 88. Example of encoder interface mode with TI1FP1 polarity inverted
IRUZDUG
MLWWHU
EDFNZDUG
MLWWHU
7,
7,
IRUZDUG
&RXQWHU
GRZQ
XS
GRZQ
069
The timer, when configured in Encoder Interface mode provides information on the sensor’s
current position. You can obtain dynamic information (speed, acceleration, deceleration) by
measuring the period between two encoder events using a second timer configured in
capture mode. The output of the encoder which indicates the mechanical zero can be used
for this purpose. Depending on the time between two events, the counter can also be read
at regular times. You can do this by latching the counter value into a third input capture
register if available (then the capture signal must be periodic and can be generated by
another timer). when available, it is also possible to read its value through a DMA request
generated by a Real-Time clock.
16.3.13
Timer input XOR function
The TI1S bit in the TIMx_CR2 register, allows the input filter of channel 1 to be connected to
the output of a XOR gate, combining the three input pins TIMx_CH1 to TIMx_CH3.
The XOR output can be used with all the timer input functions such as trigger or input
capture.
324/900
DocID022448 Rev 4