24.4.2.6 Edge Detection

When synchronous or resynchronized paths are used, edge detection must be enabled. The event system can execute 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 both rising and falling edges

Edge detection is selected by writing to the Edge Selection bit field of the Channel register (CHANNEL[n].EDGSEL).

When event channel n is configured and enabled, the channel will be ready to service incoming events after one GCLK_EVSYS_CHn cycle for rising edge detection (CHANNEL[n].EDGSEL=0x1), and after three GCLK_EVSYS_CHn cycles for falling edge detection (CHANNEL[n].EDGSEL=0x2).