Datasheet

Table Of Contents
When using synchronous or resynchronized path, the Event System includes options to transfer events to
users when rising, falling or both edges are detected on event generators.
For further details, refer to the Channel Path section of this chapter.
Related Links
31.5.2.6 Channel Path
31.5.2 Basic Operation
31.5.2.1 Initialization
Before enabling event routing within the system, the Event Users Multiplexer and Event Channels must
be selected in the Event System (EVSYS), and the two peripherals that generate and use the event have
to be configured. The recommended sequence is:
1. In the event generator peripheral, enable output of event by writing a '1' to the respective Event
Output Enable bit ("EO") in the peripheral's Event Control register (e.g., TCC.EVCTRL.MCEO1,
AC.EVCTRL.WINEO0, RTC.EVCTRL.OVFEO).
2. Configure the EVSYS:
2.1. Configure the Event User multiplexer by writing the respective EVSYS.USERm register,
see also 31.5.2.3 User Multiplexer Setup.
2.2. Configure the Event Channel by writing the respective EVSYS.CHANNELn register, see
also 31.5.2.4 Event System Channel.
3. Configure the action to be executed by the event user peripheral by writing to the Event Action bits
(EVACT) in the respective Event control register (e.g., TC.EVCTRL.EVACT,
PDEC.EVCTRL.EVACT). Note: not all peripherals require this step.
4. In the event user peripheral, enable event input by writing a '1' to the respective Event Input Enable
bit ("EI") in the peripheral's Event Control register (e.g., AC.EVCTRL.IVEI0,
ADC.EVCTRL.STARTEI).
31.5.2.2 Enabling, Disabling, and Resetting
The EVSYS is always enabled.
The EVSYS is reset by writing a ‘1’ to the Software Reset bit in the Control A register (CTRLA.SWRST).
All registers in the EVSYS will be reset to their initial state and all ongoing events will be canceled.
Refer to CTRLA.SWRST register for details.
31.5.2.3 User Multiplexer Setup
The user multiplexer defines the channel to be connected to which event user. Each user multiplexer is
dedicated to one event user. A user multiplexer receives all event channels output and must be
configured to select one of these channels, as shown in Block Diagram section. The channel is selected
with the Channel bit group in the User register (USERm.CHANNEL).
The user multiplexer must always be configured before the channel. A list of all user multiplexers is found
in the User (USERm) register description.
Related Links
31.3 Block Diagram
31.5.2.4 Event System Channel
An event channel can select one event from a list of event generators. Depending on configuration, the
selected event could be synchronized, resynchronized or asynchronously sent to the users. When
synchronization or resynchronization is required, the channel includes an internal edge detector, allowing
SAM D5x/E5x Family Data Sheet
EVSYS – Event System
© 2019 Microchip Technology Inc.
Datasheet
DS60001507E-page 849