2021-10-18 11:39 AM
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
2021-10-18 12:37 PM
How are VREF+ and VDDA connected in your hardware?
2021-10-18 12:55 PM
VDDA and VREF+ are not connected to each other on my board.
2021-10-18 01:13 PM
2021-10-18 02:02 PM
VREF pin is not connected to anything. VDD has 2 bypass caps connected to it.
2021-10-18 02:16 PM
> 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.
2021-10-18 08:43 PM
my micro does not have separate VDDA and VDD pin, and yes it is connected to 3.3V via VDD/VDDA pin.