Datasheet

24.5.8 Register Access Protection
Registers with write-access can be optionally write-protected by the Peripheral Access Controller (PAC),
except for the following:
Interrupt Flag Status and Clear register (INTFLAG)
Note:  Optional write-protection is indicated by the "PAC Write-Protection" property in the register
description.
Write-protection does not apply for accesses through an external debugger.
24.5.9 Analog Connections
Not applicable.
24.6 Functional Description
24.6.1 Principle of Operation
The Event System consists of several channels which route the internal events from peripherals
(generators) to other internal peripherals or IO pins (users). Each event generator can be selected as
source for multiple channels, but a channel cannot be set to use multiple event generators at the same
time.
24.6.2 Basic Operation
24.6.2.1 Initialization
Before enabling events routing within the system, the User Multiplexer (USER) and Channel (CHANNEL)
register must be configured. The User Multiplexer (USER) must be configured first.
Configure the User Multiplexer (USER) register:
1. The channel to be connected to a user is written to the Channel bit group (USER.CHANNEL)
2. The user to connect the channel is written to the User bit group (USER.USER)
Configure the Channel (CHANNEL) register:
1. The channel to be configured is written to the Channel Selection bit group (CHANNEL.CHANNEL)
2. The path to be used is written to the Path Selection bit group (CHANNEL.PATH)
3. The type of edge detection to use on the channel is written to the Edge Selection bit group
(CHANNEL.EDGSEL)
4. The event generator to be used is written to the Event Generator bit group (CHANNEL.EVGEN)
24.6.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 register (CTRL.SWRST). All
registers in the EVSYS will be reset to their initial state and all ongoing events will be canceled. Refer to
CTRL.SWRST register for details.
24.6.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 the next figure. The channel is selected with the
Channel bit group in the USER register (USER.CHANNEL). The user multiplexer must always be
configured before the channel. A full list of selectable users can be found in the User Multiplexer register
(USER) description. Refer to UserList for details.
SAM D21 Family
EVSYS – Event System
© 2018 Microchip Technology Inc.
Datasheet Complete
DS40001882D-page 439