38.5.10.1 Input-Output Transfer Functions

The ADC can be configured to operate in the following input voltage modes:

  • Single-ended—ADC_CCR.DIFFx = 0. This is the default mode after a reset.
  • Differential—ADC_CCR.DIFFx = 1 (see the figure Analog Full Scale Ranges in Single-ended/Differential Applications). In Differential mode, the ADC requires differential input signals with a VDD/2 common mode voltage (refer to the section “Electrical Characteristics”).

The following equations give the unsigned ADC input-output transfer function in each mode (see Note). With signed conversions (see ADC_EMR.SIGNMODE), subtract 2047 from the ADC_LCDR.LDATA value given below.

In the formulae below, REFP = VREFP, REFN = GND.

Single-ended mode:

ADC_LCDR.LDATA=ADxREFNREFPREFN×212

Differential mode:

ADC_LCDR.LDATA=1+ADxADx+1REFPREFN×211
Note: Equations assume ADC_EMR.OSR = 1

If ADC_MR.ANACH is set, the ADC can manage both differential channels and single-ended channels. If ADC_MR.ANACH is cleared, the parameters defined in ADC_CCR are applied to all channels.

The following table gives the internal positive and negative ADC inputs assignment with respect to the programmed mode (ADC_CCR.DIFFx).

For example, if Differential mode is required on channel 0, input pins AD0 and AD1 are used. In this case, only channel 0 must be enabled by writing a 1 to ADC_CHER.CH0.

Figure 38-7. Analog Full Scale Ranges in Single-ended/Differential Applications
Table 38-1. Input Pins and Channel Numbers in Single-ended and Differential Modes
Internal ADC Inputs (VIN+, VIN-)Channel Numbers
Single-ended ModeDifferential ModeSingle-ended ModeDifferential Mode
AD0, GNDAD0, AD1CH0CH0
AD1, GNDCH1
AD2, GNDAD2, AD3CH2CH2
AD3, GNDCH3
AD4, GNDCH4
VBAT, GNDCH5
VREFTEMP, GNDCH6
VTEMP, GNDCH7