English
Language : 

EFM32WG Datasheet, PDF (522/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
It is also possible to control the counter through either an external pin or PRS input. This is done through
the input logic for the Compare/Capture Channel 0. The Timer/Counter allows individual actions (start,
stop, reload) to be taken for rising and falling input edges. This is configured in the RISEA and FALLA
fields in TIMERn_CTRL. The reload value is 0 in up-count and up/down-count mode and TOP in down-
count mode.
The RUNNING bit in TIMERn_STATUS indicates if the Timer is running or not. If the SYNC bit in
TIMERn_CTRL is set, the Timer is started/stopped/reloaded (external pin or PRS) when any of the other
timers are started/stopped/reloaded.
The DIR bit in TIMERn_STATUS indicates the counting direction of the Timer at any given time. The
counter value can be read or written by software through the CNT field in TIMERn_CNT. In Up/Down-
Count mode the count direction will be set to up if the CNT value is written by software.
Figure 20.2. TIMER Hardware Timer/Counter Control
Count e r
(Cont rolled by TIMERn_CTRL)
RISEA
FALLA
St art Cou n t e r
St op
Reload& St art
Com pa re /Ca pt ure cha nne l 0
(Cont rolled by TIMERn_CC0_CTRL)
TIMn _CC0
PRS channels
PRSSEL
INSEL
Filt er
FILT
ICEDGE
Input
Capt ure 0
20.3.1.3 Clock Source
The counter can be clocked from several sources, which are all synchronized with the peripheral clock
(HFPERCLK). See Figure 20.3 (p. 522) .
Figure 20.3. TIMER Clock Selection
Count e r
(Cont rolled by TIMERn_CTRL)
HFPERCLKTIMERn
PRESC
Pr e sc a l e r
CLKSEL
Count er
Com pa re /Ca pt ure cha nne l 1
(Cont rolled by TIMERn_CC1_CTRL)
TIMn _CC1
PRS channels
PRSSEL
INSEL
Filt er
FILT
ICEDGE
Input
Capt ure 1
20.3.1.3.1 Peripheral Clock (HFPERCLK)
The peripheral clock (HFPERCLK) can be used as a source with a configurable prescale factor of
2^PRESC, where PRESC is an integer between 0 and 10, which is set in PRESC in TIMERn_CTRL.
However, if 2x Count Mode is enabled and the Compare/Capture channels are put in PWM mode, the
CC output is updated on both clock edges so prescaling the peripheral clock will result in incorrect result.
The prescaler is stopped and reset when the timer is stopped.
2013-05-08 - Wonder Gecko Family - d0233_Rev0.50
522
www.energymicro.com