...the world's most energy friendly microcontrollers
2014-07-02 - Gecko Family - d0001_Rev1.30
277
www.silabs.com
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 19.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
19.3.1.3 Clock Source
The counter can be clocked from several sources, which are all synchronized with the peripheral clock
(HFPERCLK). See Figure 19.3 (p. 277) .
Figure 19.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
19.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.
The prescaler is stopped and reset when the timer is stopped.
19.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
Summary of Contents for EFM32G
Page 505: ......