![Silicon Laboratories EFR32xG14 Wireless Gecko Скачать руководство пользователя страница 660](http://html1.mh-extra.com/html/silicon-laboratories/efr32xg14-wireless-gecko/efr32xg14-wireless-gecko_reference-manual_1271728660.webp)
20.3.2.3 Input Capture
In Input Capture Mode, the counter value (TIMERn_CNT) can be captured in the Compare/Capture Register (TIMERn_CCx_CCV) (see
Figure 20.12 TIMER/WTIMER Input Capture on page 660
). The CCPOL bits in TIMERn_STATUS indicate the polarity of the edge that
triggered the capture in TIMERn_CCx_CCV.
TIMERn_CCx_CCV
m
n
y
z
TIMERn_CNT
Input
Read TIMERn_CCx_CCV
TIMERn_CCx_CCVB
m
y
prev. val
m
y
Figure 20.12. TIMER/WTIMER Input Capture
The Compare/Capture Buffer Register (TIMERn_CCx_CCVB) and the TIMERn_CCx_CCV register form double-buffered capture regis-
ters allowing two subsequent capture events to take place before a read-out is required. The first capture can always be read from
TIMERn_CCx_CCV, and reading this address will load the next capture value into TIMERn_CCx_CCV from TIMERn_CCx_CCVB if it
contains valid data. The CC value can be read without altering the FIFO contents by reading TIMERn_CCx_CCVP.
TIMERn_CCx_CCVB can also be read without altering the FIFO contents. The ICV flag in TIMERn_STATUS indicates if there is a valid
unread capture in TIMERn_CCx_CCV. In this mode, TIMERn_CCx_CCV is read-only.
In the case where a capture is triggered while both TIMERn_CCx_CCV and TIMERn_CCx_CCVB contain unread capture values, the
buffer overflow interrupt flag (ICBOF in TIMERn_IF) will be set. On overflow new capture values will overwrite the value in
TIMERn_CCx_CCVB and the value of TIMERn_CCx_CCV will remain unchanged. TIMERn_CCx_CCV will always contain the oldest
unread value and TIMERn_CCx_CCVB will always contain the newest value.
Note:
In input capture mode, the timer will only trigger interrupts when it is running.
Reference Manual
TIMER/WTIMER - Timer/Counter
silabs.com
| Building a more connected world.
Rev. 1.1 | 660