21.3.4 Events

The TCA can generate the events described in the table below. All event generators except TCAn_HUNF are shared between Normal mode and Split mode operation, and the generator name indicates what specific signal the generator represents in each mode in the following way: OVF_LUNF corresponds to overflow in Normal mode and Low byte timer underflow in Split mode. The same applies to CMPn_LCMPn.
Table 21-3. Event Generators in TCA
Generator NameDescriptionEvent TypeGenerating Clock DomainLength of Event
PeripheralEvent
TCAnOVF_LUNF

Normal mode: Overflow

Split mode: Low byte timer underflow

PulseCLK_PEROne CLK_PER period
HUNF

Normal mode: Not available

Split mode: High byte timer underflow

PulseCLK_PEROne CLK_PER period
CMP0_LCMP0

Normal mode: Compare Channel 0 match

Split mode: Low byte timer Compare Channel 0 match

PulseCLK_PEROne CLK_PER period
CMP1_LCMP1

Normal mode: Compare Channel 1 match

Split mode: Low byte timer Compare Channel 1 match

PulseCLK_PEROne CLK_PER period
CMP2_LCMP2

Normal mode: Compare Channel 2 match

Split mode: Low byte timer Compare Channel 2 match

PulseCLK_PEROne CLK_PER period
Note: The conditions for generating an event are identical to those that will raise the corresponding interrupt flag in the TCAn.INTFLAGS register for both Normal mode and Split mode.
The TCA has two event users for detecting and acting upon input events. The table below describes the event users and their associated functionality.
Table 21-4. Event Users in TCA
User NameDescriptionInput DetectionAsync/Sync
PeripheralInput
TCAnCNTACount on a positive event edgeEdgeSync
Count on any event edgeEdgeSync
Count while the event signal is highLevelSync
The event level controls the count direction, up when low and down when highLevelSync
CNTBThe event level controls count direction, up when low and down when highLevelSync
Restart counter on a positive event edgeEdgeSync
Restart counter on any event edgeEdgeSync
Restart counter while the event signal is highLevelSync

The specific actions described in the table above are selected by writing to the Event Action (EVACTA, EVACTB) bits in the Event Control (TCAn.EVCTRL) register. Input events are enabled by writing a ‘1’ to the Enable Counter Event Input (CNTAEI and CNTBEI) bits in the TCAn.EVCTRL register.

If both EVACTA and EVACTB are configured to control the count direction, the event signals will be OR’ed to determine the count direction. Both event inputs must then be low for the counter to count upwards.

Note:
  1. Event inputs are not used in Split mode.
  2. Event actions with level input detection only work reliably if the event frequency is less than the timer’s frequency.

Refer to the Event System (EVSYS) section for more details regarding event types and Event System configuration.