Datasheet

COUNT and TOP are continuously compared, so when a new TOP value that is lower than current
COUNT is written to TOP, COUNT will wrap before a compare match.
A counter wraparound can occur in any operation mode when up-counting without buffering, see the
figure below.
Figure 30-7. Changing the Top value with Up-Counting Operation
COUNT
MAX
New TOP written to
PER that is higher
than current COUNT
Counter Wraparound
New TOP written to
PER that is lower
than current COUNT
"clear" update
"write"
ZERO
Figure 30-8. Changing the Top Value with Down-Counting Operation
COUNT
MAX
New TOP written to
PER that is higher
than current COUNT
New TOP written to
PER that is lower
than current COUNT
"reload" update
"write"
ZERO
30.6.2.7 Capture Operations
To enable and use capture operations, the event line into the TC must be enabled using the TC Event
Input bit in the Event Control register (EVCTRL.TCEI). The capture channels to be used must also be
enabled in the Capture Channel x Enable bit group in the Control C register (CTRLC.CPTENx) before
capture can be performed.
To enable and use capture operations, the corresponding Capture Channel x Enable bit in the Control C
register (CTRLC.CAPTENx) must be written to '1'.
Note:  The RETRIGGER, COUNT and START event actions are available only on an event from the
Event System.
30.6.2.7.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.
SAM D21 Family
TC – Timer/Counter
© 2018 Microchip Technology Inc.
Datasheet Complete
DS40001882D-page 672