20.3.1.12 TIMER/WTIMER Rotational Position
To calculate a position
Figure 20.10 TIMER/WTIMER Rotational Position Equation on page 659
pos° = (CNT/X x N) x 360°
Figure 20.10. TIMER/WTIMER Rotational Position Equation
where X = Encoding type and N = Number of pulses per revolution.
20.3.2 Compare/Capture Channels
The timer contains 3 Compare/Capture channels, which can be configured in the following modes:
1. Input Capture
2. Output Compare
3. PWM
20.3.2.1 Input Pin Logic
Each Compare/Capture channel can be configured as an input source for the Capture Unit or as external clock source for the timer (see
Figure 20.11 TIMER/WTIMER Input Pin Logic on page 659
). Compare/Capture channels 0 and 1 are the inputs for the Quadrature
Decoder Mode. The input channel can be filtered before it is used, which requires the input to remain stable for 5 cycles in a row before
the input is propagated to the output.
TIMn_CCx
PRS channels
PRSSEL
INSEL
Filter
FILT
ICEDGE
Input
Capture x
Figure 20.11. TIMER/WTIMER Input Pin Logic
20.3.2.2 Compare/Capture Registers
The Compare/Capture channel registers are prefixed with TIMERn_CCx_, where the x stands for the channel number. Since the Com-
pare/Capture channels serve three functions (input capture, compare, PWM), the behavior of the Compare/Capture registers
(TIMERn_CCx_CCV) and buffer registers (TIMERn_CCx_CCVB) change depending on the mode the channel is set in.
Reference Manual
TIMER/WTIMER - Timer/Counter
silabs.com
| Building a more connected world.
Rev. 1.1 | 659