16.3.2.3 Event Generators

Each event channel has several possible event generators, but only one can be selected at a time. The event generator for a channel is selected by writing to the respective Channel n Generator Selection (EVSYS.CHANNELn) register. By default, the channels are not connected to any event generator. For details on event generation, refer to the documentation of the corresponding peripheral.

A generated event is either synchronous or asynchronous to the device peripheral clock (CLK_PER). Asynchronous events can be generated outside the normal edges of the peripheral clock, making the system respond faster than the selected clock frequency would suggest. Asynchronous events can also be generated while the device is in a sleep mode when the peripheral clock is not running.

Any generated event is classified as either a pulse event or a level event. In both cases, the event can be either synchronous or asynchronous, with properties according to the table below.

Table 16-1. Properties of Generated Events
Event Type Sync/Async Description
Pulse Sync An event generated from CLK_PER that lasts one clock cycle
Async An event generated from a clock other than CLK_PER lasting one clock cycle
Level Sync An event generated from CLK_PER that lasts multiple clock cycles
Async An event generated without a clock (for example, a pin or a comparator), or an event generated from a clock other than CLK_PER that lasts multiple clock cycles

The properties of both the generated event and the intended event user must be considered in order to ensure reliable and predictable operation.

The table below shows the available event generators for this device family.

Table 16-2. Event Generators
Generator Name Description Event Type Generating Clock Domain Length of Event
Peripheral Event
UPDI SYNCH SYNCH character Async, Level CLK_PDI SYNCH character on PDI RX input synchronized to CLK_PDI
RTC OVF Counter Overflow Async, Pulse CLK_RTC One CLK_RTC period
CMP Compare Match
EVGEN0 Selectable prescaled RTC event Async, Level CLK_RTC Prescaled RTC period
EVGEN1
CCL LUTn LUT output level Async, Level Asynchronous Depends on CCL configuration
ACn OUT Comparator output level Async, Level Asynchronous Given by AC output level
ADC0 RES Result ready Sync, Pulse CLK_PER One CLK_PER period
SAMP Sample ready
WCMP Window compare match
PORTx EVGEN0 Pin level Async, Level Asynchronous Given by pin level
EVGEN1
USARTn XCK Clock signal in SPI host mode and synchronous USART host mode Sync, Level TXCLK Minimum two CLK_PER periods
SPI0 SCK SPI host clock Sync, Level CLK_PER Minimum two CLK_PER periods
TCAn OVF_LUNF

Normal mode: Overflow

Split mode: Low Byte Timer underflow

Sync, Pulse CLK_PER One CLK_PER period
HUNF

Normal mode: Not available

Split mode: High Byte Timer underflow

CMP0_LCMP0

Normal mode: Compare Channel 0 match

Split mode: Low Byte Timer Compare Channel 0 match

CMP1_LCMP1

Normal mode: Compare Channel 1 match

Split mode: Low Byte Timer Compare Channel 1 match

CMP2_LCMP2

Normal mode: Compare Channel 2 match

Split mode: Low byte timer Compare Channel 2 match

TCBn CAPT CAPT interrupt flag set Sync, Pulse CLK_PER One CLK_PER period
OVF Counter overflow