14.6.3.3 TMR input function
The TMR1 has four independent channels. Each channel can be configured as input or output.
As input, each channel input signal is processed as below:
– TMRx_CHx outputs the pre-processed CxIRAW. Set the C1INSEL bit to select the source of
C1IRAW from TMRx_CH1 or the XOR-ed TMRx_CH1, TMRx_CH2 and TMRx_CH3, and the
sources of C2IRAW, C3IRAW and C4IRAW are TMRx_CH2, TMRx_CH3 and TMRx_CH4,
respectively.
– CxIRAW inputs digital filter and outputs a filtered signal CxIF. Set the sampling frequency and
sampling times of digital filter by setting the CxDF bit.
– CxIF inputs edge detector and outputs the signal CxIFPx after edge selection. The edge selection
is controlled by CxP and CxCP bits, and can be selected as rising edge, falling edge or both edges
active.
– CxIFPx inputs capture signal selector and then outputs the signal CxIN after setection. The capture
signal selector is controlled by the CxC bits. The source of CxIN can be set as CxIFPx, CyIFPx or
STCI. The CyIFPx (x≠y) is the CyIFPy from channel y and handled by channel x edge detector (for
example, the C1IFP2 is the C1IFP1 from channel 1 and then handled by channel 2 edge detector),
and STCI derives from the slave timer controller, and its source is selected by setting the STIS bit.
– CxIN outputs the signal CxIPS that is divided by the input channel divider. The division factor is set
to “No division”, “divided by 2”, “divided by 4” or “divided by 8” by setting the CxIDIV bit.
Figure 14-107 Input/output channel 1 main circuit