Datasheet

Figure 31-13. Changing the Period Using Buffering
COUNT
New value written to
PERB that is higher than
current COUNT
New value written to
PERB that is lower
than current COUNT
"reload" update
"write"
PER is updated with
PERB value.
MAX
ZERO
31.6.2.7 Capture Operations
To enable and use capture operations, the Match or Capture Channel x Event Input Enable bit in the
Event Control register (EVCTRL.MCEIx) must be written to '1'. The capture channels to be used must
also be enabled in the Capture Channel x Enable bit in the Control A register (CTRLA.CPTENx) before
capturing can be performed.
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 31-14. Input Capture Timing
events
COUNT
MAX
ZERO
Capture 0 Capture 1 Capture 2 Capture 3
For input capture, the buffer register and the corresponding CCx act like a FIFO. When CCx is empty or
read, any content in CCBx 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. CCBx register value can't be read, all
captured data must be read from CCx register.
SAM D21 Family
TCC – Timer/Counter for Control Applications
© 2018 Microchip Technology Inc.
Datasheet Complete
DS40001882D-page 720