cancel
Showing results for 
Search instead for 
Did you mean: 

What are the reference on STM32G071 devices with no VREF+ input

FwMaker
Associate II

On my NUCLEO-G071RB board, I am able to use CubeMX to setup VREFBUF mode to use the VREF+ input-pin, internal 2.5V or 2.048V for reference for ADC and DAC.

But I'm making a schematic for a STM32G071GBUxN, which does not have a VREF+ pin and in CubeMX I don't find any setup of the reference for this device.

So what is the ADC/DAC reference for this device and how do I make adjustments?

1 ACCEPTED SOLUTION

Accepted Solutions
RomainR.
ST Employee

Hello @FwMaker (Community Member)

Unfortunately not, you will not be able to use the VREFBUF in internal mode on a package that does not have its own VREF+ pin.

For this type of package without VREF+ pin, the full scale reference of ADC/DAC will be the voltage of VDDA/VSSA and this is why the option does not appear in CubeMX.

You can refer to AN5690 VREFBUF Peripheral applications and trimming techniques (chapter 2)

Thank you in advance to tag my return as answered.

Best regards

Romain,

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.

View solution in original post

8 REPLIES 8
RomainR.
ST Employee

Hello @FwMaker (Community Member)

The information is in DS12232 Rev 4 page 12 Table 12. Pin assignment and description.

VREF+ pin is only available on LQFP/QFN48 and UFBGA/LQFP64 package.

Otherwise this pin is common with VDDA and ADC/DAC analog supply and reference is the VDDA voltage.

It is also into RM0444 4.1 Power supplies.

VREF+ is delivered through VREF+ pin. On packages without VREF+ pin, VREF+ is internally connected with VDD, and the internal voltage reference buffer must be kept disabled (refer to datasheets for package pinout description).

Best regards

Romain

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.

FwMaker
Associate II

Hi @RomainR.​ 

Thanks, this clarifies that VREF+ on packages without a physical pin are connected to VDD.

But, is it still possible to use the internal voltage reference buffer which has the option of selecting 2.5 V or 2.048 V like stated in "RM0444 - 17.2 VREFBUF functional description"?

The reason that I'm asking is that I can't find the setting for this in CubeMX for package STM32G071GBUxN.

For package STM32G071RBTx, which are the device used on the Nucleo-G071RB board, this setting can be found on the in CubeMX where in SystemCore->SYS you can select "VREFBUF Mode" and select "Internal voltage reference":

0693W00000UFPHCQA5.pngWhere after, it is possible to select the desired "Internal Voltage reference scale".

Therefore: Is the internal voltage reference available on devices without VREF+ pin?

If yes: Is this setting available somewhere in CubeMX?

Best Regards

Miguel

RomainR.
ST Employee

Hello @FwMaker (Community Member)

Unfortunately not, you will not be able to use the VREFBUF in internal mode on a package that does not have its own VREF+ pin.

For this type of package without VREF+ pin, the full scale reference of ADC/DAC will be the voltage of VDDA/VSSA and this is why the option does not appear in CubeMX.

You can refer to AN5690 VREFBUF Peripheral applications and trimming techniques (chapter 2)

Thank you in advance to tag my return as answered.

Best regards

Romain,

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.

FwMaker
Associate II

Thanks Romain.

Unfortunately, this is bad news for me.

Using the Power Supply as reference will give terrible precision and/or demand unnecessarily high requirements on the power supply stability. I don't understand why it was designed this way.

BR Miguel

ONadr.1
Senior III

I use the internal reference measurement method for these cases. I take the internal reference as a reference point and recalculate all values from the converter to it by linear interpolation. However, manual calibration must be done for each MCU because the internal reference voltage cannot be measured. But the measurement results are then correct even for larger power supply changes.

FwMaker
Associate II

Hi @ONadr.1​ 

Thanks for your input. I'm trying to get my head around this 😊

According to the STM32G071x datasheet p.25:

0693W00000UnVi2QAF.pngThen I assume that I should be able to correct the my measurements using this value.

The value saved in my device on my Nucleo-G071RB fetched from memory address 0x1FFF75AA are:

0x67B (1659)

Then; from RM0444 p.378 we have:

0693W00000UnVjoQAF.pngWhen I get the ADC value from VREFINT (ADC_ch13) I get: 0x62F (1583).

Then, using the formula above:

VREF+ = VREF+_Charac × VREFINT_CAL �?� VREFINT_DATA = 3.0V x 1659 / 1583 = 3.144V

But when I measure the Supply/Reference voltage of the Nucleo board it is 3.306V

That is a deviation of (3.306-3.144)*100/3.306 = 4.9%.

I were hoping for more precision.

Am I misunderstanding something here?

BR Miguel

Did you perform ADC calibration as outlined by Calibration (ADCAL) subchapter of ADC chapter in RM, before taking the measurement?

JW

FwMaker
Associate II

Thanks @Community member​ 👍

That was just what I needed. With the offset calibration and use of the factory stored calibration data, then the deviation is only 0.054%!!!