Silicon Laboratories EFR32xG14 Wireless Gecko Reference Manual page 451

Table of Contents

Advertisement

16.3.1.5 Oversampling Quadrature Decoder Mode
There are three Oversampling Quadrature Decoder Modes supported: 1X , 2X and 4X. These modes are enabled by writing OVS-
QUAD1X, OVSQUAD2X and OVSQUAD4X, respectively, to the MODE field in PCNTn_CTRL and disabled by writing DISABLE to the
same field. The LFACLK clock source to the pulse counter must be configured by clearing PCNT0CLKSEL in the CMU_PCNTCTRL in
the Clock Management Unit (CMU),
The optional pulse width filter is enabled by setting the FILT bit in the PCNTn_CTRL register. The filter applies to both inputs
PCNTn_S0IN and PCNTn_S1IN. The filter length is configured by FILTLEN in PCNTn_OVSCFG register.
Based on the modes selected, the decoder updates the counter on different events. In the OVSQUAD1X mode, the counter is updated
on the rising edge of the PCNTn_S0IN input when counting up, and on the negedge of the PCNTn_S0IN input when counting down. In
the OVSQUAD2X mode, the counter is updated on both edges of PCNTn_S0IN input. In the OVSQUAD4X mode the counter is upda-
ted on both edges of both inputs PCNTn_S0IN and PCNTn_S1IN.
Function on page 451
outlines the increment or decrement of the counter based on the Quadrature Mode selected.
Note:
The decoding behavior of OVSQUAD1X mode is slightly different compared to EXTCLKQUAD mode(also 1X mode). In the EX-
TCLKQUAD mode, the counter is updated only on the posedge of S0IN input. However, in the OVSQUAD1X mode, the counter is up-
dated on the posedge of S0IN when counting up and on the negedge of S0IN when counting down.
Table 16.2. PCNT OVSQUAD 1X, 2X and 4X Mode Counter Control Function
Direction
S1IN
0
0
Clockwise
1
1
1
1
Counter Clock-
wise
0
0
Figure 16.3 PCNT State Transitions for Different Oversampling Quadrature Decoder Modes on page 452
of the quadrature input and the state transitions that updates the counter for the different modes. Each cycle of the input states results
in 1 update, 2 updates and 4 updates of the counter for OVSQUAD1X, OVSQUAD2X and OVSQUAD4X modes respectively.
silabs.com | Building a more connected world.
11. CMU - Clock Management Unit
Previous State
S0IN
0
1
1
0
0
1
1
0
.
Table 16.2 PCNT OVSQUAD 1X, 2X and 4X Mode Counter Control
Next State
S1IN
S0IN
0
1
1
1
1
0
0
0
1
1
0
1
0
0
1
0
Reference Manual
PCNT - Pulse Counter
OVSQUAD MODE
1X
2X
4X
+1
+1
+1
+1
+1
+1
+1
-1
-1
-1
-1
-1
-1
-1
illustrates the different states
Rev. 1.1 | 451

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the EFR32xG14 Wireless Gecko and is the answer not in the manual?

Questions and answers

Table of Contents