This is the quick start guide for the SAM4L Asynchronous Timer (AST) Driver, with step-by-step instructions on how to configure and use the driver for a specific use case.The code examples can be copied into the main application loop or any other function that will need to control the AST module.
This use case will demonstrate how to initialize the AST module to calendar or counter mode.
This module requires the following service:
Add this to the main loop or a setup function:
We can get the calendar value by:
Or we can get the counter value by:
We can set the alarm interrupt by:
And we can set the periodic interrupt by: