Skip to main content
Associate
January 13, 2026
Solved

STM32U073: measure VBAT pin voltage when VDDA(3.0V) and VREF+(2.5V) are separated?

  • January 13, 2026
  • 1 reply
  • 420 views

Hi everyone.

I'm using the STM32U073Mx / LQFP-80 pin.

While designing a schematic, I ran out of ports, so I'm curious to see if I can use the VDD (battery voltage) to VBAT pin trick to measure the battery voltage. I'm looking at the datasheet and reference manual(RM0503).

For reference, I'm using VREF+ as an Internal voltage reference mode to measure the temperature sensor (will use thermistor's power source), so I can no longer use the VREF+ pin as an input.
So, I'm trying to configure it as needed.

When measuring the thermistor temperature sensor, I use VREFBUFF(Internal voltage reference mode) to power the thermistor.

 

And for normal ADC operation, VREFBUFF(maybe Hold mode) is connected as the ADC reference voltage.

Anyway, I found the following sentence in the RM documentation, and I'd like to know its exact meaning.

[Temperature sensor, DAC output, VREFINT and VBAT internal channels
The temperature sensor is connected to channel ADC VIN[11].
The internal voltage reference VREFINT is connected to channel ADC VIN[12].
VBAT channel is connected to ADC VIN[13] channel.
The internal dac_out1 output voltage is connected to ADC VIN[19] channel.
When VREF+ is lower than VDDA, this channel is not converted.]

 

Is the conversion blocked(mean not converted) in hardware when VREF+ is lower than VDDA?
Or is the ADC functioning, but the converted value is unreliable?

Best answer by ssHan

I'm sharing the results of my own testing.

The MCU I selected, the STM32U073Mx / LQFP-80 pin, has a structure that allows for separate VDDA and VREF+ pins.

Therefore, I confirmed that the following statement does not apply.

[Temperature sensor, DAC output, VREFINT and VBAT internal channels
The temperature sensor is connected to channel ADC VIN[11].
The internal voltage reference VREFINT is connected to channel ADC VIN[12].
VBAT channel is connected to ADC VIN[13] channel.
The internal dac_out1 output voltage is connected to ADC VIN[19] channel.
When VREF+ is lower than VDDA, this channel is not converted.]

 

If you use the same MCU(STM32U073Mx / LQFP-80) as I did and design it with separate VDDA and VREF+ pins, you must set VREFBUFF to internal voltage reference mode to ensure normal ADC measurements.

 

However, when running the ST's example code, you must redefine the following section with your own voltage or apply the actual VREF+ voltage value.
#define VDDA_APPLI (3300UL)  

I changed it as follows:
#define VDDA_APPLI (2048UL)

1 reply

ssHanAuthorBest answer
Associate
January 16, 2026

I'm sharing the results of my own testing.

The MCU I selected, the STM32U073Mx / LQFP-80 pin, has a structure that allows for separate VDDA and VREF+ pins.

Therefore, I confirmed that the following statement does not apply.

[Temperature sensor, DAC output, VREFINT and VBAT internal channels
The temperature sensor is connected to channel ADC VIN[11].
The internal voltage reference VREFINT is connected to channel ADC VIN[12].
VBAT channel is connected to ADC VIN[13] channel.
The internal dac_out1 output voltage is connected to ADC VIN[19] channel.
When VREF+ is lower than VDDA, this channel is not converted.]

 

If you use the same MCU(STM32U073Mx / LQFP-80) as I did and design it with separate VDDA and VREF+ pins, you must set VREFBUFF to internal voltage reference mode to ensure normal ADC measurements.

 

However, when running the ST's example code, you must redefine the following section with your own voltage or apply the actual VREF+ voltage value.
#define VDDA_APPLI (3300UL)  

I changed it as follows:
#define VDDA_APPLI (2048UL)

mƎALLEm
Technical Moderator
January 21, 2026

Hello,

The sentence: "When VREF+ is lower than VDDA, this channel is not converted." seems to be appeared by mistake. It will be removed from the reference manual.

"To give better visibility on the answered topics, please click on ""Accept as Solution"" on the reply which solved your issue or answered your question."