In this use case, the EVENT module is configured for:
Synchronous event path with rising edge detection
TC4 as event generator on the allocated event channel (TC0 is used for SAM L22)
One event channel user attached
An event interrupt hook is used to execute some code when an event is detected
In this use case TC is used as event generator, generating events on overflow. One user attached, counting events on the channel. To be able to execute some code when an event is detected, an interrupt hook is used. The interrupt hook will also count the number of events detected and toggle a LED on the board each time an event is detected.
Note: Because this example is showing how to set up an interrupt hook there is no user attached to the user.