13.24.6.5.3 Events

The TCC can generate the following output events:
  • Overflow/Underflow (OVF)
  • Trigger (TRG)
  • Counter (CNT) – For further details, refer to the EVCTRL.CNTSEL description.
  • Compare Match or Capture on compare/capture channels: MCx
Writing a '1' ('0') to an Event Output bit in the Event Control Register (EVCTRL.xxEO) enables (disables) the corresponding output event. Also, refer to EVSYS – Event System.
The TCC can take the following actions on a channel input event (MCx):
  • Capture event
  • Generate a recoverable or non-recoverable fault
The TCC can take the following actions on counter Event 1 (TCCx EV1):
  • Counter re-trigger
  • Counter direction control
  • Stop the counter
  • Decrement the counter on event
  • Period and pulse width capture
  • Non-recoverable fault
The TCC can take the following actions on counter Event 0 (TCCx EV0):
  • Counter re-trigger
  • Count on event (increment or decrement, depending on counter direction)
  • Counter start – Start counting on the event rising edge. Further events will not restart the counter; the counter will keep on counting using prescaled GCLK_TCCx, until it reaches TOP or ZERO, depending on the direction.
  • Counter increment on event. This will increment the counter, irrespective of the counter direction.
  • Count during the active state of an asynchronous event (increment or decrement, depending on counter direction). In this case, the counter will be incremented or decremented on each cycle of the prescaled clock, as long as the event is active.
  • Non-recoverable fault

The counter Event Actions are available in the Event Control registers (EVCTRL.EVACT0 and EVCTRL.EVACT1). For further details, refer to EVCTRL.

Writing a '1' ('0') to an Event Input bit in the Event Control register (EVCTRL.MCEIx or EVCTRL.TCEIx) enables (disables) the corresponding action on the input event.

Note: When several events are connected to the TCC, the enabled action will apply for each of the incoming events. Refer to EVSYS – Event System for details on how to configure the event system.