Datasheet
SAM4E [DATASHEET]
Atmel-11157D-ATARM-SAM4E16-SAM4E8-Datasheet_12-Jun-14
1358
Figure 45-12. Digital Averaging Function Waveforms on a single trigger event
When USEQ is set, the user can define the channel sequence to be converted by configuring AFEC_SEQRx and
AFEC_CHER so that channels are not interleaved during the averaging period. Under these conditions, a sample
is defined for each end of conversion as described in Figure 45-13 on page 1359.
Therefore, if the same channel is configured to be converted four times consecutively and RES = 2 in the extended
mode register (AFEC_EMR), the averaging result is placed in the corresponding channel internal data register
(read by means of the AFEC_CDR) and the last converted data register (AFEC_LCDR) for each trigger event.
In such case, the AFEC effective sample rate remains the maximum AFEC sample rate divided by 4.
When USEQ=1 and the RES field enables the Enhanced Resolution Mode, it is important to notice that the user
sequence must be a sequence being an integer multiple of 4 (i.e., the number of the enabled channel in the
channel status register AFEC_CHSR must be an integer multiple of 4 and the AFEC_SEQRx must be a series of 4
times the same channel index).
Internal/External
Trigger event
AFEC_SEL
0
AFEC_EMR.RES = 2, STM = 1, AFEC_CHSR[1:0] = 0x3 and AFEC_MR.USEQ = 0
internal register
CDR[1]
CH0_0
AFEC_LCDR
0i1
0
0i2 0i3 CH0_1
EOC[0]
Read AFEC_CDR & AFEC_CSELR.CSEL = 0
Read AFEC_CDR & AFEC_CSELR.CSEL = 1
CH1_1CH0_1
EOC[1]
Read AFEC_LCDR
DRDY
0111
0
0
CH1_0 1i1 1i2 1i3 CH1_1
Note: 0i1, 0i2, 0i3, 1i1, 1i2, 1i3 are intermediate results and CH0/1_0/1 are final result of average function.
01 11
internal register
CDR[0]