Datasheet
Note: The reference voltage pins always remain connected in Normal mode as in Sleep mode.
Related Links
58. Electrical Characteristics for SAM V70/V71
52.6.8 Comparison Window
The AFEC features automatic comparison functions. It compares converted values to a low threshold, a high
threshold or both, depending on the value of AFEC_EMR.CMPMODE. The comparison can be done on all channels
or only on the channel specified in AFEC_EMR.CMPSEL. T
o compare all channels, AFEC_EMR.CMPALL must be
set.
Moreover, a filtering option can be set by writing the number of consecutive comparison errors needed to raise the
flag. This number can be written and read in AFEC_EMR.CMPFILTER.
The flag can be read on AFEC_ISR.COMPE and can trigger an interrupt.
The high threshold and the low threshold can be read/written in the Compare Window Register (AFEC_CWR).
Depending on the sign of the conversion, chosen by setting the SIGNMODE bit in the AFEC Extended Mode
Register, the high threshold and low threshold values must be signed or unsigned to maintain consistency during the
comparison. If the conversion is signed, both thresholds must also be signed; if the conversion is unsigned, both
thresholds must be unsigned. If comparison occurs on all channels, the SIGNMODE bit must be set to
ALL_UNSIGNED or ALL_SIGNED and thresholds must be set accordingly.
52.6.9 Differential Inputs
The AFE can be used either as a single-ended AFE (AFEC_DIFFR.DIFF = 0) or as a fully differential AFE
(AFEC_DIFFR.DIFF = 1). By default, after a reset, the AFE is in Single-ended mode.
The AFEC can apply a different mode on each channel.
The same inputs are used in Single-ended or Differential mode.
Depending on the AFE mode, the analog multiplexer selects one or two inputs to map to a channel. The table below
provides input mapping for both modes.
Table 52-2. Input Pins and Channel Numbers
Input Pins Channel Numbers
Single-ended Mode Differential Mode
AFE_AD0 CH0 CH0
AFE_AD1 CH1
... ... ...
AFE_AD10 CH10 CH10
AFE_AD11 CH11
52.6.10 Sample-and-Hold Modes
The AFE can be configured in either single Sample-and-Hold mode (AFEC_SHMR.DUALx = 0) or dual Sample-and-
Hold mode (AFEC_SHMR.DUALx = 1). By default, after a reset, the AFE is in single Sample-and-Hold mode.
The AFEC can apply a dif
ferent mode on each channel.
The same inputs are used in single Sample-and-Hold mode or in dual Sample-and-Hold mode. Single-ended/
Differential mode and single/dual Sample-and-Hold mode can be combined. See the following tables.
Table 52-3. Input Pins and Channel Numbers In Dual Sample-and-Hold Mode
Single-Ended Input Pins Differential Input Pins Channel Numbers
AFE_AD0 & AFE_AD6 AFE_AD0-AD1 & AFE_AD6–AFE_AD7 CH0
SAM E70/S70/V70/V71 Family
Analog Front-End Controller (AFEC)
© 2019 Microchip T
echnology Inc.
Datasheet
DS60001527D-page 1661










