...the world's most energy friendly microcontrollers
2014-07-02 - Tiny Gecko Family - d0034_Rev1.20
254
www.silabs.com
Figure 17.2. TIMER Hardware Timer/Counter Control
Counter
(Cont rolled by TIMERn_CTRL)
Compare/ Capture channel 0
(Cont rolled by TIMERn_CC0_CTRL)
TIMn_CC0
PRS channels
PRSSEL
INSEL
Filt er
FILT
ICEDGE
Input
Capt ure 0
Counter
RISEA
FALLA
St art
St op
Reload&St art
17.3.1.3 Clock Source
The counter can be clocked from several sources, which are all synchronized with the peripheral clock
(HFPERCLK). See Figure 17.3 (p. 254) .
Figure 17.3. TIMER Clock Selection
Counter
(Cont rolled by TIMERn_CTRL)
Compare/ Capture channel 1
(Cont rolled by TIMERn_CC1_CTRL)
TIMn_CC1
PRS channels
PRSSEL
INSEL
Filt er
FILT
ICEDGE
HFPERCLK
TIMERn
CLKSEL
Prescaler
PRESC
Input
Capt ure 1
Count er
17.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.
17.3.1.3.2 Compare/ Capture Channel 1 Input
The Timer can also be clocked by positive and/or negative edges on the Compare/Capture channel 1
input. This input can either come from the TIMn_CC1 pin or one of the PRS channels. The input signal
must not have a higher frequency than f
HFPERCLK
/3 when running from a pin input or a PRS input with
FILT enabled in TIMERn_CCx_CTRL. When running from PRS without FILT, the frequency can be as
high as f
HFPERCLK
. Note that when clocking the Timer from the same pulse that triggers a start (through
RISEA/FALLA in TIMERn_CTRL), the starting pulse will not update the Counter Value.
Summary of Contents for EFM32TG
Page 543: ......