44.6.4.3 Events
The TCC can generate the following output
events:
- Overflow/Underflow (OVF)
- Trigger (TRG)
- Counter (CNT) For further details, refer to EVCTRL.CNTSEL description.
- Compare Match or Capture on compare/capture channels: MCy
The TCC can take the following actions on
a channel input event (MCy):
- Capture event
- Generate a recoverable or non-recoverable fault
The TCC can take the following actions on
counter Event 1 (TCCx_EV_1):
- 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_EV_0):
- 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 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(EVCTRL <2:0>) and EVCTRL.EVACT1(EVCTRL <5:3>)). For further details, refer to EVCTRL.
Writing a '1' to an Event Input bit in the Event Control register (EVCTRL.MCEIy or EVCTRL.TCEIn where n=0,1) enables the corresponding action on input event, where writing '0' disables the action on 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.
Reference:
- EVSYS