...the world's most energy friendly microcontrollers
2014-07-02 - Tiny Gecko Family - d0034_Rev1.20
261
www.silabs.com
Figure 17.15. TIMER Block Diagram Showing Comparison Functionality
TnCCR0[15:0
]
TnCCR1[15:0
]
Underflow
Com pare Mat ch x
TIMERn_TOP
TIMERn_CNT
TIMERn_CCx
Updat e
Condit ion
Not e: For sim plicit y, all
TIMERn_CCx regist ers are
grouped t oget her in t he figure,
but t hey all have individual
Com pare Regist er and logic
=
= 0
==
TIMn_CC0
Com pare and
PWM config
Com pare and
PWM config
Com pare and
PWM config
=
TIMn_CC1
TIMn_CC2
CNTCLK
Overflow
If occurring in the same cycle, match action will have priority over overflow or underflow action.
The input selected (through PRSSEL, INSEL and FILTSEL in TIMERn_CCx_CTRL) for the CC channel
will also be sampled on compare match and the result is found in the CCPOL bits in TIMERn_STATUS.
It is also possible to configure the CCPOL to always track the inputs by setting ATI in TIMERn_CTRL.
The COIST bit in TIMERn_CCx_CTRL is the initial state of the compare/PWM output. The COIST bit
can also be used as an initial value to the compare outputs on a reload-start when RSSCOIST is set in
TIMERn_CTRL. Also the resulting output can be inverted by setting OUTINV in TIMERn_CCx_CTRL. It
is recommended to turn off the CC channel before configuring the output state to avoid any pulses on
the output. The CC channel can be turned off by setting MODE to OFF in TIMER_CCx_CTRL.
Figure 17.16. TIMER Output Logic
TIMn_CCx
COIST
OUTINV
Out put
Com pare/
PWM x
0
1
17.3.2.4.1 Frequency Generation (FRG)
Frequency generation (see Figure 17.17 (p. 262) ) can be achieved in compare mode by:
• Setting the counter in up-count mode
• Enabling buffering of the TOP value.
• Setting the CC channels overflow action to toggle
Summary of Contents for EFM32TG
Page 543: ......