...the world's most energy friendly microcontrollers
2014-07-02 - Tiny Gecko Family - d0034_Rev1.20
260
www.silabs.com
Figure 17.13. TIMER Input Capture
TIMERn_CCx _CCV
m
m
n
y
z
TIMERn_CNT
Input
Read TIMERn_CCx _CCVB
TIMERn_CCx _CCVB
m
y
prev. val
prev. val
17.3.2.3.1 Period/Pulse-Width Capture
Period and/or pulse-width capture can be achieved by setting the RISEA field in TIMERn_CTRL to
Clear&Start, and select the wanted input from either external pin or PRS, see Figure 17.14 (p. 260) .
For period capture, the Compare/Capture Channel should then be set to input capture on a rising edge
of the same input signal. To capture a the width of a high pulse, the Compare/Capture Channel should
be set to capture on a falling edge of the input signal. To start the measuring period on either a falling
edge or measure the low pulse-width of a signal, opposite polarities should be chosen.
Figure 17.14. TIMER Period and/or Pulse width Capture
0
Input
CNT
Clear&St art
Input Capt ure (frequency capt ure)
Input Capt ure (pulse- widt h capt ure)
17.3.2.4 Compare
Each Compare/Capture channel contains a comparator which outputs a compare match if the contents
of TIMERn_CCx_CCV matches the counter value, see Figure 17.15 (p. 261) . In compare mode, each
compare channel can be configured to either set, clear or toggle the output on an event (compare match,
overflow or underflow). The output from each channel is represented as an alternative function on the
port it is connected to, which needs to be enabled for the CC outputs to propagate to the pins.
Summary of Contents for EFM32TG
Page 543: ......