cancel
Showing results for 
Search instead for 
Did you mean: 

Voltage reference buffer output does not match expected value?

jugal
Associate III

Device: STM32G061 (custom board), system running at 8mhz.

I set the vrefbuf mode to Internal voltage reference mode in cubemx. According Scale 0 the expected output on Vref pin should be 2.048V but the value i measured was always 0.2-0.3V greater than expected. It is not constant, the value changes slightly after every power cycle. I see similar results for Scale 1 as well.

I have tried setting up the Vrefbuf through direct register access but without any luck.

VREFBUF->CSR |= VREFBUF_CSR_ENVR;   //internal voltage reference mode
VREFBUF->CSR &= ~VREFBUF_CSR_HIZ;   //Vref pin connected to vrefbuf output
while (!(VREFBUF->CSR & VREFBUF_CSR_VRR))  //wait for vref buf output to reach requested level

6 REPLIES 6
TDK
Guru

How are VREF+ and VDDA connected in your hardware?

If you feel a post has answered your question, please click "Accept as Solution".
jugal
Associate III

VDDA and VREF+ are not connected to each other on my board.

Sure, but what are they connected to? A schematic would be the most informative.
If you feel a post has answered your question, please click "Accept as Solution".
jugal
Associate III

VREF pin is not connected to anything. VDD has 2 bypass caps connected to it.

> VDD has 2 bypass caps connected to it.

Do you mean VDDA? So it's not connected to a voltage source? It should generally be connected to VDD. If that's not the problem, not sure what else it could be.

If you feel a post has answered your question, please click "Accept as Solution".
jugal
Associate III

my micro does not have separate VDDA and VDD pin, and yes it is connected to 3.3V via VDD/VDDA pin.