Product Specs

Table Of Contents
37 SAADC Successive approximation analog-
to-digital converter
Page
360
Total time < Sum(CH[x].t
ACQ
+t
CONV
), x=0..enabled channels
The SAMPLERATE register can be used as a local timer instead of triggering individual SAMPLE tasks.
When SAMPLERATE.MODE is set to Timers, it is sufficient to trigger SAMPLE task only once in order to
start the SAADC and triggering the STOP task will stop sampling. The SAMPLERATE.CC field controls the
sample rate.
The SAMPLERATE timer mode cannot be combined with SCAN mode, and only one channel can be
enabled in this mode.
A DONE event signals that one sample has been taken.
In this mode, the RESULTDONE event has the same meaning as DONE when no oversampling takes place.
Note that both events may occur before the actual value has been transferred into RAM by EasyDMA.
37.5.3 Oversampling
An accumulator in the ADC can be used to average noise on the analog input. In general, oversampling
improves the signal-to-noise ratio (SNR). Oversampling, however, does not improve the integral non-linearity
(INL), or differential non-linearity (DNL).
Oversampling and scan should not be combined, since oversampling and scan will average over input
channels.
The accumulator is controlled in the OVERSAMPLE register. The SAMPLE task must be set 2
OVERSAMPLE
number of times before the result is written to RAM. This can be achieved by:
Configuring a fixed sampling rate using the local timer or a general purpose timer and PPI to trigger a
SAMPLE task
Triggering SAMPLE 2
OVERSAMPLE
times from software
Enabling BURST mode
CH[n].CONFIG.BURST can be enabled to avoid setting SAMPLE task 2
OVERSAMPLE
times. With
BURST = 1 the ADC will sample the input 2
OVERSAMPLE
times as fast as it can (actual timing:
<(t
ACQ
+t
CONV
)×2
OVERSAMPLE
). Thus, for the user it will just appear like the conversion took a bit longer time,
but other than that, it is similar to one-shot mode. Scan mode can be combined with BURST=1, if burst is
enabled on all channels.
A DONE event signals that one sample has been taken.
In this mode, the RESULTDONE event signals that enough conversions have taken place for an
oversampled result to get transferred into RAM. Note that both events may occur before the actual value has
been transferred into RAM by EasyDMA.
37.5.4 Scan mode
A channel is considered enabled if CH[n].PSELP is set. If more than one channel, CH[n], is enabled, the
ADC enters scan mode.
In scan mode, one SAMPLE task will trigger one conversion per enabled channel. The time it takes to
sample all channels is:
A DONE event signals that one sample has been taken.
In this mode, the RESULTDONE event signals has the same meaning as DONE when no oversampling
takes place. Note that both events may occur before the actual values have been transferred into RAM by
EasyDMA.
Figure 99: Example of RAM placement (even RESULT.MAXCNT), channels 1, 2 and 5 enabled on page
361 provides an example of results placement in Data RAM, with an even RESULT.MAXCNT. In this
example, channels 1, 2 and 5 are enabled, all others are disabled.