English
Language : 

EFM32WG Datasheet, PDF (606/834 Pages) List of Unclassifed Manufacturers – The EFM32WG Wonder Gecko is the ideal choice for demanding 8-, 16-, and 32-bit energy sensitive applications.
...the world's most energy friendly microcontrollers
In EXTCLKQUAD mode, the EDGE bit in PCNTn_CTRL inverts the direction of the counter (which is
automatically detected).
Note
The EDGE bit in PCNTn_CTRL has no effect in EXTCLKSINGLE mode.
24.3.8 PRS S0IN and S1IN Input
It is possible to receive input from PRS on both SOIN and S1IN by setting S0PRSEN or S1PRSEN in
PCNTn_INPUT. The PRS channel used can be selected using S0PRSSEL in PCNTn_INPUT.
24.3.9 Interrupts
The interrupt generated by PCNT uses the PCNTn_INT interrupt vector. Software must read the
PCNTn_IF register to determine which module interrupt that generated the vector invocation.
24.3.9.1 Underflow and Overflow Interrupts
The underflow interrupt flag (UF) is set when the counter counts down from 0. I.e. when the value of
the counter is 0 and a new pulse is received. The PCNTn_CNT register is loaded with the PCNTn_TOP
value after this event.
The overflow interrupt flag (OF) is set when the counter counts up from the PCNTn_TOP (reload) value.
I.e. if PCNTn_CNT = PCNTn_TOP and a new pulse is received. The PCNTn_CNT register is loaded
with the value 0 after this event.
24.3.9.2 Direction Change Interrupt
The PCNTn_PCNT module sets the DIRCNG interrupt flag (PCNTn_IF register) when the direction of
the quadrature code changes. The behavior of this interrupt is illustrated by Figure 24.3 (p. 606) .
Figure 24.3. PCNT Direction Change Interrupt (DIRCNG) Generation
PCNTn _S0 IN
PCNTn _S1 IN
In t er r u p t
PCNTn_CNT n
n+ 1
St andard async
handshake
interface
X
X
Invalid pulse generated when
the shaft changes direction
n+ 2
n+ 3
n+ 2
Delay from the shaft physically
changed direction until the
counter direction is changed
and the interrupt is generated
2013-05-08 - Wonder Gecko Family - d0233_Rev0.50
606
www.energymicro.com