Product Specs

Table Of Contents
37 SAADC Successive approximation analog-
to-digital converter
Page
361
31
RESULT.PTR
RESULT.PTR + 4
RESULT.PTR + 8
16 15 0
RESULT.PTR +
2*(RESULT.MAXCNT 2)
Figure 99: Example of RAM placement (even RESULT.MAXCNT), channels 1, 2 and 5 enabled
Figure 100: Example of RAM placement (odd RESULT.MAXCNT), channels 1, 2 and 5 enabled on page
361 provides an example of results placement in Data RAM, with an odd RESULT.MAXCNT. In this
example, channels 1, 2 and 5 are enabled, all others are disabled. The last 32-bit word is populated only with
one 16-bit result.
31
RESULT.PTR
RESULT.PTR + 4
RESULT.PTR + 8
16 15 0
RESULT.PTR +
2*(RESULT.MAXCNT 1)
Figure 100: Example of RAM placement (odd RESULT.MAXCNT), channels 1, 2 and 5 enabled
37.6 EasyDMA
After configuring RESULT.PTR and RESULT.MAXCNT, the ADC resources are started by triggering the
START task. The ADC is using EasyDMA to store results in a Result buffer in RAM.
The Result buffer is located at the address specified in the RESULT.PTR register. The RESULT.PTR
register is double-buffered and it can be updated and prepared for the next START task immediately after
the STARTED event is generated. The size of the Result buffer is specified in the RESULT.MAXCNT register
and the ADC will generate an END event when it has filled up the Result buffer, see Figure 101: ADC on
page 362. Results are stored in little-endian byte order in Data RAM. Every sample will be sign extended to
16 bit before stored in the Result buffer.
The ADC is stopped by triggering the STOP task. The STOP task will terminate an ongoing sampling. The
ADC will generate a STOPPED event when it has stopped. If the ADC is already stopped when the STOP
task is triggered, the STOPPED event will still be generated.
CH[2] 1
st
result
CH[1] 1
st
result
CH[1] 2
nd
result
CH[5] 1
st
result
CH[5] 2
nd
result
CH[2] 2
nd
result
(…)
CH[5] last result
CH[2] last result
CH[2] 1
st
result
CH[1] 1
st
result
CH[1] 2
nd
result
CH[5] 1
st
result
CH[5] 2
nd
result
CH[2] 2
nd
result
(…)
CH[5] last result