Analog-to-digital converters (ADC) RM0351
500/1693 DocID024597 Rev 3
6. Calculate the actual temperature using the following formula:
Where:
• TS_CAL2 is the temperature sensor calibration value acquired at 110°C
• TS_CAL1 is the temperature sensor calibration value acquired at 30°C
• TS_DATA is the actual temperature sensor output value converted by ADC
Refer to the device datasheet for more information about TS_CAL1 and TS_CAL2
calibration points.
Note: The sensor has a startup time after waking from power-down mode before it can output V
TS
at the correct level. The ADC also has a startup time after power-on, so to minimize the
delay, the ADEN and CH17SEL bits should be set at the same time.
16.3.32 V
BAT
supply monitoring
The CH18SEL bit in the ADCx_CCR register is used to switch to the battery voltage. As the
V
BAT
voltage could be higher than V
DDA
, to ensure the correct operation of the ADC, the
V
BAT
pin is internally connected to a bridge divider by 3. This bridge is automatically enabled
when CH18_SEL is set, to connect V
BAT
/3 to the ADC1_IN18 or ADC3_IN18 input
channels. As a consequence, the converted digital value is one third of the V
BAT
voltage. To
prevent any unwanted consumption on the battery, it is recommended to enable the bridge
divider only when needed, for ADC conversion.
Refer to the electrical characteristics of the device datasheet for the sampling time value to
be applied when converting the V
BAT
/3 voltage.
Figure 127 shows the block diagram of the V
BAT
sensing feature.
Figure 127. V
BAT
channel block diagram
Note: The CH18_SEL bit must be set to enable the conversion of internal channels ADC1_IN18
and ADC3_IN18 (V
BAT
/3).
Temperature in °C()
110 °C 30 °C–
TS_CAL2 TS_CAL1–
----------------------------------------------------------
TS_DATA TS_CAL1–()30 °C+×=
06Y9
9
%$7
9
%$7
&+6(/FRQWUROELW
$'&[
$'&LQSXW
$GGUHVVGDWDEXV