09.12.2012 Views

RM0090: Reference manual - STMicroelectronics

RM0090: Reference manual - STMicroelectronics

RM0090: Reference manual - STMicroelectronics

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Advanced-control timers (TIM1&TIM8) <strong>RM0090</strong><br />

Figure 112. Example of counter operation in encoder interface mode.<br />

TI1<br />

TI2<br />

Counter<br />

forward jitter backward<br />

jitter<br />

forward<br />

Figure 113 gives an example of counter behavior when TI1FP1 polarity is inverted (same<br />

configuration as above except CC1P=’1’).<br />

Figure 113. Example of encoder interface mode with TI1FP1 polarity inverted.<br />

TI1<br />

TI2<br />

Counter<br />

The timer, when configured in Encoder Interface mode provides information on the sensor’s<br />

current position. You can obtain dynamic information (speed, acceleration, deceleration) by<br />

measuring the period between two encoder events using a second timer configured in<br />

capture mode. The output of the encoder which indicates the mechanical zero can be used<br />

for this purpose. Depending on the time between two events, the counter can also be read<br />

at regular times. You can do this by latching the counter value into a third input capture<br />

register if available (then the capture signal must be periodic and can be generated by<br />

another timer). when available, it is also possible to read its value through a DMA request<br />

generated by a real-time clock.<br />

383/1416 Doc ID 018909 Rev 3<br />

up down up<br />

forward jitter backward<br />

jitter<br />

forward<br />

down<br />

up<br />

down

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!