![Geehy SEMICONDUCTOR APM32F405 Series Скачать руководство пользователя страница 211](http://html1.mh-extra.com/html/geehy-semiconductor/apm32f405-series/apm32f405-series_user-manual_573630211.webp)
www.geehy.com Page 210
Figure 49 Timing Diagram in Single-pulse Mode
t
DELAY
t
PULSE
AUTORLD
CC1
OCxREF
OCx
Forced output mode
In the forced output mode, the comparison result is ignored, and the
corresponding level is directly output according to the configuration instruction.
CCxSEL=00 for TMRx_CCMx register, set CCx channel as output
OCxMOD=100/101 for TMRx_CCMx register, set to force OCxREF
signal to invalid/valid state
In this mode, the corresponding interrupt and DMA request will still be
generated.
Encoder interface mode
The encoder interface mode is equivalent to an external clock with direction
selection. In the encoder interface mode, the content of the timer can always
indicate the position of the encoder.
The selection method of encoder interface is as follows:
By setting SMFSEL bit of TMRx_SMCTRL register, set the counter to
count on the edge of TI1 channel /TI2 channel, or count on the edge
of TI1 and TI2 at the same time.
Select the polarity of TI1 and TI2 by setting the CC1POL and
CC2POL bits of TMRx_CCEN register.
Select to filter or not by setting the IC1F and IC2F bits of
TMRx_CCM1 register.
The two input TI1 and TI2 can be used as the interface of incremental
encoder. The counter is driven by the effective jump of the signals TI1FP1
and TI2FP2 after filtering and edge selection in TI1 and TI2.
The count pulse and direction signal are generated according to the input
signals of TI1 and TI2
The counter will count up/down according to the jumping sequence of
the input signal