16.3.2.4 Event Users

The event channel to listen to is selected by configuring the event user. An event user may require the event signal to be either synchronous or asynchronous to the peripheral clock. An asynchronous event user can respond to events in sleep modes when clocks are not running. Such events can be responded to outside the normal edges of the peripheral clock, making the event user respond faster than the clock frequency would suggest. For details on the requirements of each peripheral, refer to the documentation of the corresponding peripheral.

Most event users implement edge or level detection to trigger actions in the corresponding peripheral based on the incoming event signal. In both cases, a user can either be synchronous, which requires that the incoming event is generated from the peripheral clock (CLK_PER), or asynchronous, if not. Some asynchronous event users do not apply event input detection but use the event signal directly. The different event user properties are described in general in the table below.

Table 16-3. Properties of Event Users
Input Detection Async/Sync Description
Edge Sync An event user is triggered by an event edge and requires that the incoming event is generated from CLK_PER
Async An event user is triggered by an event edge and has asynchronous detection or an internal synchronizer
Level Sync An event user is triggered by an event level and requires that the incoming event is generated from CLK_PER
Async An event user is triggered by an event level and has asynchronous detection or an internal synchronizer
No detection Async An event user will use the event signal directly

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

Table 16-4. Event Users
USER Name Description Input Detection Async/Sync
Peripheral Input
CCL LUTnx LUTn event input x Level Async
ADCn START ADC start on event Edge Async
EVSYS EVOUTx EVSYS pin output x No detection Async
USARTn IRDA USARTn IrDA event input Level Sync
TCAn CNTA Count on positive event edge Edge Sync
Count on any event edge Edge
Count while event signal is high Level
Event level controls count direction, up when low and down when high Level
CNTB Event level controls count direction, up when low and down when high Level Sync
Restart counter on positive event edge Edge
Restart counter on any event edge Edge
Restart counter while event signal is high Level
TCBn CAPT Timeout check Edge Sync
Input capture on event Edge
Input capture frequency measurement Edge
Input capture pulse-width measurement Edge
Input capture frequency and pulse-width measurement Edge
Single-shot Edge Both
COUNT Count on event Edge Sync