Datasheet
52.6.14 Enhanced Resolution Mode and Digital Averaging Function
The Enhanced Resolution mode is enabled when AFEC_EMR.RES is set to 13-bit resolution or higher. In this mode,
the AFEC trades conversion performance for accuracy by averaging multiple samples, thus providing a digital low-
pass filter function. The resolution mode selected determines the oversampling, which represents the performance
reduction factor
.
To increase the accuracy by averaging multiple samples, some noise must be present in the input signal. The noise
level should be between one and two LSB peak-to-peak to get good averaging performance.
The following table summarizes the oversampling ratio depending on the resolution mode selected.
Table 52-6. Resolution and Oversampling Ratio
Resolution Mode Oversampling Ratio
13-bit 4
14-bit 16
15-bit 64
16-bit 256
Free Run mode is not supported if Enhanced Resolution mode is used.
The selected oversampling ratio applies to all enabled channels
except the temperature sensor channel if triggered
by an RTC event. See 52.5.4 Temperature Sensor.
The average result is valid into an internal register (read by means of the AFEC_CDR) only if EOCx (x corresponding
to the index of the channel) flag is set in AFEC_ISR and OVREx flag is cleared in the AFEC_OVER. The average
result is valid for all channels in the AFEC_LCDR only if DRDY is set and GOVRE is cleared in the AFEC_ISR.
Note that the AFEC_CDR is not buffered. Therefore, when an averaging sequence is ongoing, the value in this
register changes after each averaging sample. However, overrun flags in the AFEC_OVER rise as soon as the first
sample of an averaging sequence is received. Thus the previous averaged value is not read, even if the new
averaged value is not ready.
As a result, when an overrun flag rises in the AFEC_OVER, this indicates only that the previous unread data is lost. It
does not indicate that this data has been overwritten by the new averaged value, as the averaging sequence
concerning this channel can still be on-going.
The samples can be defined in different ways for the averaging function depending on the configuration of
AFEC_EMR.STM and AFEC_MR.USEQ.
When USEQ is cleared, there are two possible ways to generate the averaging through the trigger event. If
AFEC_EMR.STM is cleared, every trigger event generates one sample for each enabled channel, as described in the
figure below. Therefore, four trigger events are requested to get the result of averaging if RES = 2.
SAM E70/S70/V70/V71 Family
Analog Front-End Controller (AFEC)
© 2019 Microchip T
echnology Inc.
Datasheet
DS60001527D-page 1666










