Datasheet

Table Of Contents
When the channel is counting events from the Event System, write a '1' to the TC Event Input Invert
Enable bit in Event Control register (EVCTRL.TCINV).
Figure 48-11. Capture Double Buffering
BV
"capture"
IF
COUNT
CCBx
CCx
EN
EN
"INT/DMA
request"
data read
For input capture, the buffer register and the corresponding CCx act like a FIFO. When CCx is empty or
read, any content in CCBUFx is transferred to CCx. The buffer valid flag is passed to set the CCx
interrupt flag (IF) and generate the optional interrupt, event or DMA request. The CCBUFx register value
can't be read, all captured data must be read from CCx register.
Note: 
When up-counting (CTRLBSET.DIR=0), counter values lower than 1 cannot be captured. To capture the
full range including value 0, the TC must be in down-counting mode (CTRLBSET.DIR=0).
48.6.2.8.1 Event Capture Action
The compare/capture channels can be used as input capture channels to capture events from the Event
System and give them a timestamp. The following figure shows four capture events for one capture
channel.
Figure 48-12. Input Capture Timing
events
COUNT
TOP
ZERO
Capture 0 Capture 1 Capture 2 Capture 3
The TC can detect capture overflow of the input capture channels: When a new capture event is detected
while the Capture Interrupt flag (INTFLAG.MCx) is still set, the new timestamp will not be stored and
INTFLAG.ERR will be set.
SAM D5x/E5x Family Data Sheet
TC – Timer/Counter
© 2019 Microchip Technology Inc.
Datasheet
DS60001507E-page 1723