Atmel SAM4L Xplained Pro Evaluation Kit Atmel ATSAM4L-XPRO ATSAM4L-XPRO Data Sheet

Product codes
ATSAM4L-XPRO
Page of 1204
851
42023E–SAM–07/2013
ATSAM4L8/L4/L2
Refer to the Module Configuration section at the end of this chapter for the list of generators
implementing Event Shapers.
31.7
Application Example
This application example shows how the Peripheral Event System can be used to program the
ADC Interface to perform ADC conversions at selected intervals. 
One of the possible ADC conversion trigger is a peripheral event trigger, allowing the Peripheral
Event System to synchronize conversion with some configured peripheral event source. One
particular peripheral event source can be an AST peripheral event, among other types of periph-
eral events. The Peripheral Event System can then be used to set up the ADC Interface to
sample an analog signal at regular intervals generated by the AST. 
The user must enable peripheral events in the AST and in the ADC Interface. Refer to the corre-
sponding chapters for how this is accomplished. Next, the AST will generate peripheral events
periodically, and the Peripheral Event System will route the peripheral events to the ADC Inter-
face, which will perform ADC conversions at the selected intervals.
Figure 31-4. Application Example
Since the AST peripheral event is an asynchronous event, the description above will also work
in Power Save Modes where the ADC clock is stopped. In this case, the ADC clock (and clock
source, if needed) will be restarted during the ADC conversion. After the conversion, the ADC
clock and clock source will return to the sleep state, unless the ADC generates an interrupt,
which in turn will wake up the system. Using asynchronous events thus allows ADC operation in
much lower power states than would otherwise be possible.
Table 31-3.
Event Propagation Latency
Generator
CHMXi.EVMX
Input Glitch Filter
EVSj.IGF
Latency
Clock
Software event
-
0
-
Generator without Event Shaper
-
0
-
Generator with Event Shaper
Off
2
CLK_PEVC
Generator with Event Shaper
On
3 * 2
IGFDR
 CLK_RCSYS
Asynchronous Generator in 
SleepWalking™ operation
On or Off
unpredicted
-
Peripheral 
Event 
System
AST
ADC 
Interface
Trigger 
conversion
Periodic peripheral 
event