DocID026119 Rev 5
25/133
STM32L151xC/C-A STM32L152xC/C-A
Functional overview
54
3.10
ADC (analog-to-digital converter)
A 12-bit analog-to-digital converters is embedded into STM32L151xC/C-A and
STM32L152xC/C-A devices with up to 40 external channels, performing conversions in
single-shot or scan mode. In scan mode, automatic conversion is performed on a selected
group of analog inputs with up to 28 external channels in a group.
The ADC can be served by the DMA controller.
An analog watchdog feature allows very precise monitoring of the converted voltage of one,
some or all scanned channels. An interrupt is generated when the converted voltage is
outside the programmed thresholds.
The events generated by the general-purpose timers (TIMx) can be internally connected to
the ADC start triggers, to allow the application to synchronize A/D conversions and timers.
An injection mode allows high priority conversions to be done by interrupting a scan mode
which runs in as a background task.
The ADC includes a specific low-power mode. The converter is able to operate at maximum
speed even if the CPU is operating at a very low frequency and has an auto-shutdown
function. The ADC’s runtime and analog front-end current consumption are thus minimized
whatever the MCU operating mode.
3.10.1 Temperature
sensor
The temperature sensor (TS) generates a voltage V
SENSE
that varies linearly with
temperature.
The temperature sensor is internally connected to the ADC_IN16 input channel which is
used to convert the sensor output voltage into a digital value.
The sensor provides good linearity but it has to be calibrated to obtain good overall
accuracy of the temperature measurement. As the offset of the temperature sensor varies
from chip to chip due to process variation, the uncalibrated internal temperature sensor is
suitable for applications that detect temperature changes only.
To improve the accuracy of the temperature sensor measurement, each device is
individually factory-calibrated by ST. The temperature sensor factory calibration data are
stored by ST in the system memory area, accessible in read-only mode. See
Temperature sensor calibration values
3.10.2
Internal voltage reference (V
REFINT
)
The internal voltage reference (V
REFINT
) provides a stable (bandgap) voltage output for the
ADC and Comparators. V
REFINT
is internally connected to the ADC_IN17 input channel. It
enables accurate monitoring of the V
DD
value (when no external voltage, VREF+, is
available for ADC). The precise voltage of V
REFINT
is individually measured for each part by
ST during production test and stored in the system memory area. It is accessible in read-
only mode. See
Table 15: Embedded internal reference voltage calibration values
.