...the world's most energy friendly microcontrollers
2016-04-28 - Giant Gecko Family - d0053_Rev1.20
532
www.silabs.com
Figure 20.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
20.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 20.14 (p. 532)
. For period capture, the Compare/Capture Channel 0 should then be set to input capture on a rising
edge of the same input signal. To capture the width of a high pulse, the 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 20.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)
20.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 20.15 (p. 533) . 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 Giant Gecko EFM32GG
Page 842: ......