This is the quick start guide for the SAM4L Peripheral Event Controller (PEVC) Driver, with step-by-step instructions on how to configure and use the driver for a specific use case.
The use cases contain several code fragments. The code fragments in the steps for setup can be copied into a custom initialization function, while the steps for usage can be copied into, e.g., the main application function.
This use case will demonstrate how to use the Peripheral Event Controller on SAM4L_EK. In this use case, one Event Channel is configured as:
This module requires the following service:
Copy-paste the following setup code to your application:
Add this to the main loop or a setup function:
After the channel is configured correctly and enabled, each time a new event from AST occurs, a character is sent to the USART via PDCA without the use of the CPU.