cancel
Showing results for 
Search instead for 
Did you mean: 

Does the STM32G070CB/KB/RB have an internal voltage reference?

Nikita91
Lead II

In the RM0454 the chapter 14.9 is "Temperature sensor and internal reference voltage". It explain how to compute the actual VREF+ using the internal reference voltage. And the ADC has a VREFINT channel.

But I can't find VREFBUF.

In the datasheet (DS12766 V2) the block diagram of the STM32G070 doesn't display an internal voltage référence in the ADC block. But the chapter 5.3.4 gives the embedded voltage reference parameters.

Finally there is one or there is not?

and what is VREFINT for?

4 REPLIES 4
KnarfB
Principal III

Yes, there is a VREFINT. VREFBUF is primarily for providing the ref. voltage on a pin for external components. It is not neccessary for internal ADC measurements.

The VREFINT ADC measurement gives you a digial value for a known voltage, the stable bandgap voltage. That and few trimming parameters can be used for measuring the MCUs VDD and temperature. There may be even a HAL wrapper __HAL_ADC_CALC_TEMPERATURE (not tested for G0).

hth

KnarfB

KDJEM.1
ST Employee

Hello @Nikita91​ ,

First let me thank you for posting.

The VREFINT is available in STM32G070, this internal voltage reference is internally connected to the ADC Vin[13] and provides a stable (bandgap) voltage output for the ADC.

So, you can use the VREFINT to calculate your actual VREF+ voltage.

However, the Voltage reference buffer VREFBUF is not available in STM32G0x0 MCUs series.

When your question is answered, please close this topic by choosing Select as Best. This will help other users find that answer faster.

Kaouthar

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.

Nikita91
Lead II

Thanks, I understand.

There is indeed an internal voltage reference, there is a VREF pin, but we cannot use this reference.

When conditioning analog signals you often need VREF/2, and there you can't do it.

It's the kind of pettiness of the MCU designers that I find too bad: I'll have to use an external reference...

KnarfB
Principal III

These are different things. You apply VREF from an extrnal source and this the voltage which will be converted to 4095 (12-bit mode) by the ADC. So you can generate VREF/2 externally too for conditioning the input signals and all that.

VREFINT is a constant voltage generated in the MCU, independently of VDD and VDDA which may vary within specs or may degrade over time for a battery source. Measuring VREFINT produces a digital value which is not constant because the ADC range ends at VREF which is generally unknown or may be varying.

If you provide a well stabilized VREF, you may not need VREFINT. But if you don't, the MCU has an internal yardstick that helps you out. Especially useful for low-cost battery powered designs.

hth

KnarfB