The SAADC Example demonstrates the use of the analog-to-digital converter (SAADC) peripheral. It uses the SAADC driver.
The example initializes the TIMER driver to generate regular compare events. Also, it initializes the PPI driver and allocates one channel to propagate compare events from the TIMER to sample events of the SAADC.
The example initializes the SAADC driver and configures one channel to sample analog input 0 (GPIO pin 2). Once initialization is done, the example provides input buffers for converted samples to the driver and enables the PPI channel. When a buffer is filled, a driver callback is called, and the samples are printed on the console.
You can find the source code and the project file of the example in the following folder: <InstallFolder>\examples\peripheral\saadc
Test the SAADC Example application by performing the following steps: