22.5.6 Events

The TC can generate the following events:

Table 22-5. Event Generators in TC
Generator NameDescriptionEvent TypeGenerating Clock DomainLength of Event
PeripheralEvent
TCnOVFOverflow or UnderflowPulseGCLK_TCnOne GCLK_TCn period
MC_nCompare Match or Capture on compare/capture channel nPulseGCLK_TCnOne GCLK_TCn period
Note: The conditions for generating an event are identical to those that will raise the corresponding interrupt flag in the TCn.INTFLAGS register.

Writing a ‘1’ to an Event Output Enable bit in the Event Control Register (EVCTRL.xxEO) enables the corresponding output event. Writing a ‘0’ to this bit disables the corresponding output event.

The TC can connect to the following events:

Table 22-6. Event Users
User NameDescriptionInput DetectionChannel Path Type
PeripheralInput
TCnEVUEvent InputLevel

Asynchronous
Synchronous
Resynchronized

Writing a ‘1’ to an Event Input Enable bit in the Event Control register (EVCTRL.xxEI) enables the corresponding action on input event. Writing a ‘0’ to this bit disables the corresponding action on input event.

Note: EVn input detection depends on the configuration of the Timer/Counter Event n Invert Enable bit in the Event Control register (EVCTRL.TCINVn) and the Timer/Counter Event Input n Action bit fields in the Event Control register (EVCTRL.EVACTn).

The event users can trigger the following actions:

Table 22-7. Event Actions
Event InputEvent ActionDescription
EVURETRIGGERCounter retrigger
COUNTCount on event (increment or decrement, depending on counter direction)
STARTCounter start - Start counting on the event rising edge. Further events will not restart the counter; the counter will keep on counting using prescaled GCLK_TCn, until it reaches TOP or ZERO, depending on the direction.
STAMPCapture Time-stamp (overflow)
PPWPeriod and pulse width capture. The period is captured in CC0, and the pulse width is captured in CC1.
PWPPulse width and period capture. The period is captured in CC1, and the pulse width is captured in CC0.
PWPulse width capture

Refer to the EVSYS - Event System chapter for details on configuring the event system.