910
SAM4CP [DATASHEET]
43051E–ATPL–08/14
40.6.5 Conversion Triggers
Conversions of the active analog channels are started with a software or hardware trigger. The software trigger is
provided by writing the Control register (ADC_CR) with the START bit at 1.
The hardware trigger can be one of the TIOA outputs of the Timer Counter channels or the external trigger input of the
ADC (ADTRG). The hardware trigger is selected with the TRGSEL field in ADC_MR. The selected hardware trigger is
enabled with the TRGEN bit in ADC_MR.
The minimum time between two consecutive trigger events must be strictly greater than the duration time of the longest
conversion sequence as configured in the Mode register (ADC_MR), the Channel Status register (ADC_CHSR) and the
Channel Sequence 1 register (ADC_SEQR1).
If a hardware trigger is selected, the start of a conversion is triggered after a delay which starts at each rising edge of the
selected signal. Due to asynchronous handling, the delay may vary in a range of 2 MCK clock periods to 1 ADC clock
period.
Figure 40-5.
Hardware Trigger Delay
If one of the TIOA outputs is selected, the corresponding Timer Counter channel must be programmed in waveform
mode.
Only one start command is necessary to initiate a conversion sequence on all the channels. The ADC hardware logic
automatically performs the conversions on the active channels, then waits for a new request. The Channel Enable
(ADC_CHER) and Channel Disable (ADC_CHDR) registers permit the analog channels to be enabled or disabled
independently.
If the ADC is used with a PDC, only the transfers of converted data from enabled channels are performed and the
resulting data buffers should be interpreted accordingly.
40.6.6 Sleep Mode and Conversion Sequencer
The ADC sleep mode maximizes power saving by automatically deactivating the ADC when it is not being used for
conversions. Sleep mode is selected by setting the SLEEP bit in ADC_MR.
The Sleep mode is managed by a conversion sequencer, which automatically processes the conversions of all channels
at lowest power consumption.
This mode can be used when the minimum period of time between two successive trigger events is greater than the
startup period of the ADC (See the ADC Characteristics section).
When a start conversion request occurs, the ADC is automatically activated. As the analog cell requires a start-up time,
the logic waits during this time and starts the conversion on the enabled channels. When all conversions are complete,
the ADC is deactivated until the next trigger. Triggers occurring during the sequence are not taken into account.
The conversion sequencer allows automatic processing with minimum processor intervention and optimized power
consumption. Conversion sequences can be performed periodically using a Timer/Counter output. By using the PDC, the
periodic acquisition of several samples can be processed automatically without any intervention of the processor.
The sequence can be customized by programming ADC_SEQR1 and setting to 1 the USEQ bit of ADC_MR. The user
can choose a specific order of channels and can program up to 8 conversions by sequence. The user is totally free to
create his own sequence, by writing channel numbers in ADC_SEQR1. Not only can channel numbers be written in any
sequence, they can be repeated several times. Only enabled sequence bits are converted.
If all ADC channels (i.e. 8) are used on an application board, there is no restrictions in the use of the user sequence.
However, if some ADC channels are not enabled for conversion but rather used as pure digital inputs, the respective
indexes of these channels cannot be used in the user sequence fields in ADC_SEQR1. For example, if channel 3 is
trigger
start
delay