Datasheet

24.6.2.5.3 Resynchronized Path
The resynchronized path should be used when the event generator and the event channel do not share
the same generic clock generator. When the resynchronized path is used, resynchronization of the event
from the event generator is done in the channel. For details on generic clock generators, refer to GCLK -
Generic Clock Controller.
When the resynchronized path is used, the channel is able to generate interrupts. The channel status bits
in the Channel Status register (CHSTATUS) are also updated and available for use.
If the Generic Clocks Request bit in the Control register is zero (CTRL.GCLKREQ=0), the channel
operates in SleepWalking mode and requests the configured generic clock only when an event is to be
propagated through the channel. If CTRL.GCLKREQ=1 , the generic clock will always be on for the
configured channel.
Related Links
15. GCLK - Generic Clock Controller
24.6.2.6 Edge Detection
When synchronous or resynchronized paths are used, edge detection must be used. The event system
can perform edge detection in three different ways:
Generate an event only on the rising edge
Generate an event only on the falling edge
Generate an event on rising and falling edges
Edge detection is selected by writing to the Edge Selection bit group in the Channel register
(CHANNEL.EDGSEL).
If the generator event is a pulse, both edges cannot be selected. Use the rising edge or falling edge
detection methods, depending on the generator event default level.
24.6.2.7 Event Generators
Each event channel can receive the events form all event generators. All event generators are listed in
the statement of CHANNEL.EVGEN. For details on event generation, refer to the corresponding module
chapter. The channel event generator is selected by the Event Generator bit group in the Channel
register (CHANNEL.EVGEN). By default, the channels are not connected to any event generators (ie,
CHANNEL.EVGEN = 0)
24.6.2.8 Channel Status
The Channel Status register (CHSTATUS) shows the status of the channels when using a synchronous or
resynchronized path. There are two different status bits in CHSTATUS for each of the available channels:
The CHSTATUS.CHBUSYn bit will be set when an event on the corresponding channel n has not
been handled by all event users connected to that channel.
The CHSTATUS.USRRDYn bit will be set when all event users connected to the corresponding
channel are ready to handle incoming events on that channel.
24.6.2.9 Software Event
A software event can be initiated on a channel by setting the Software Event bit in the Channel register
(CHANNEL.SWEVT) to ‘1’ at the same time as writing the Channel bits (CHANNEL.CHANNEL). This will
generate a software event on the selected channel.
The software event can be used for application debugging, and functions like any event generator. To use
the software event, the event path must be configured to either a synchronous path or resynchronized
path (CHANNEL.PATH = 0x0 or 0x1), edge detection must be configured to rising-edge detection
(CHANNEL.EDGSEL= 0x1) and the Generic Clock Request bit must be set to '1' (CTRL.GCLKREQ=0x1).
SAM D21 Family
EVSYS – Event System
© 2018 Microchip Technology Inc.
Datasheet Complete
DS40001882D-page 442