2022-09-28 06:51 AM
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?
Solved! Go to Solution.
2022-09-29 01:16 AM
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.
2022-09-28 07:04 AM
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.
2022-09-29 12:47 AM
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":
Where 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
2022-09-29 01:16 AM
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.
2022-09-29 02:05 AM
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
2022-09-29 03:45 AM
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.
2022-10-06 06:58 AM
Hi @ONadr.1
Thanks for your input. I'm trying to get my head around this :smiling_face_with_smiling_eyes:
According to the STM32G071x datasheet p.25:
Then 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:
When 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
2022-10-06 09:13 AM
Did you perform ADC calibration as outlined by Calibration (ADCAL) subchapter of ADC chapter in RM, before taking the measurement?
JW
2022-10-07 05:20 AM
Thanks @Community member :thumbs_up:
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%!!!