Atmel Xplained Pro Evaluation Kit for the ATSAMD21J18A Microcontroller ATSAMD21-XPRO ATSAMD21-XPRO Data Sheet

Product codes
ATSAMD21-XPRO
Page of 1018
670
Atmel | SMART SAM D21 [DATASHEET]
Atmel-42181C–SAM-D21_Datasheet–07/2014
z
Count: CNT. This is an asynchronous interrupt and can be used to wake-up the device from any sleep mode. For 
further details, refer to 
.CNTSEL description.
z
Capture Overflow Error: ERR. This is an asynchronous interrupt and can be used to wake-up the device from any 
sleep mode.
z
Debug Fault State: DFS. This is an asynchronous interrupt and can be used to wake-up the device from any sleep 
mode.
z
Recoverable Faults: FAULTn. This is an asynchronous interrupt and can be used to wake-up the device from any 
sleep mode.
z
Non-recoverable Faults: FAULTx. This is an asynchronous interrupt and can be used to wake-up the device from 
any sleep mode.
z
Compare Match or Capture Channel: MCx. This is an asynchronous interrupt and can be used to wake-up the 
device from any sleep mode.
Each interrupt source has an interrupt flag associated with it. The interrupt flag in the Interrupt Flag Status and Clear 
(INTFLAG) register is set when the interrupt condition occurs. Each interrupt can be individually enabled by writing a one 
to the corresponding bit in the Interrupt Enable Set (INTENSET) register, and disabled by writing a one to the 
corresponding bit in the Interrupt Enable Clear (INTENCLR) register. An interrupt request is generated when the interrupt 
flag is set and the corresponding interrupt is enabled. The interrupt request remains active until the interrupt flag is 
cleared, the interrupt is disabled, or the TCC is reset. See the 
 for details on how to clear interrupt flags. The 
TCC has one common interrupt request line for all the interrupt sources. Refer to 
 for details. The user must read the INTFLAG register to determine which interrupt condition is present. 
Note that interrupts must be globally enabled for interrupt requests to be generated. Refer to 
 for details.
30.6.4.3  Events
The TCC can generate the following output events:
z
Overflow/Underflow: OVF
z
Trigger: TRG
z
Counter: CNT. For further details, refer to 
.CNTSEL description.
z
Compare Match or Capture on compare/capture channels: MCx
Writing a one to an Event Output bit in the Event Control Register (EVCTRL.xxEO) enables the corresponding output 
event. Writing a zero to this bit disables the corresponding output event. Refer to 
for details on configuring the event system.
The TCC can take the following actions on a channel input event (MCx):
z
Capture event
z
Generate a recoverable fault
The TCC can take the following actions on counter event 1 (TCCx EV1):
z
Counter retrigger
z
Counter direction control
z
Stop the counter
z
Decrement the counter on event
z
Period and pulse width capture
z
Non-recoverable fault
The TCC can take the following actions on counter event 0 (TCCx EV0):
z
Counter retrigger
z
Count on event (increment or decrement, depending on counter direction)
z
Counter start. Start counting on the event rising edge. Further events will not restart the counter; it keeps on 
counting using prescaled GCLK_TCCx, until it reaches TOP or Zero depending on the direction.
z
Counter increment on event. This will increment the counter irrespective of the counter direction.