2023-06-20 06:23 AM
STM32H7A3RIT6 Voltage reference buffer (VREFBUF)
I’m using
HAL_SYSCFG_EnableVREFBUF();
HAL_SYSCFG_VREFBUF_VoltageScalingConfig(SYSCFG_VREFBUF_VOLTAGE_SCALE0);
To select internal vref 2/5 volt
But it seems that the ADC takes the voltage of 3.3 which is connected to the VDDA
The 64 pin has no VREF pin !!
I checked the registers and they seem to be written correctly
I want to work with internal and not external reference voltage
Would appreciate help
2023-06-20 09:58 AM
Dear @hroze.1 ,
Here is a quick presentation on VREFBUF on STM32H7 series , indeed when external VREF+ pin is not available it is bonded to VDDA at package level . https://www.st.com/content/ccc/resource/training/technical/product_training/group0/2c/42/01/68/ee/51/44/39/STM32H7-Analog-Voltage_reference_buffer_VREFBUF/files/STM32H7-Analog-Voltage_reference_buffer_VREFBUF.pdf/_jcr_content/translations/en.STM32H7-Analog-Voltage_reference_buffer_VREFBUF.pdf
hope it helps you .
Have a good day
2023-06-20 10:05 AM
I know that the external reference voltage is VDDA
But why can't I get an internal reference voltage?
2023-06-20 10:27 AM
just take a case with more pins, then you can switch.
here you have big cpu in super small case (cracy idea, didnt know, that this cpu is in so small case at all; i use 144pin lqfp.)
so, as by STOne told: >indeed when external VREF+ pin is not available it is bonded to VDDA at package level <
but you still can use the vrefint as a reference :
so need to calculate more, because take so small case . :)
2023-06-20 11:28 AM
In my circuit VDDA is connected to 3.3 volts
I want to use an internal reference voltage of 2.5 volts
According to the specification of the component
VREFBUF control and status register (VREFBUF_CSR)
Bits 6:4 VRS[2:0]: Voltage reference scale
These bits select the value generated by the voltage reference buffer.
000: Voltage reference set to 2.5 V
001: Voltage reference set to 2.048 V
010: Voltage reference set to 1.8 V
011: Voltage reference set to 1.5 V
I write to the register but there is no effect on the readings of the ADC, which means the reference voltage is from VDDA and not internal
I would appreciate advice
2023-06-20 11:55 AM - edited 2023-06-20 11:57 AM
did you read, what i wrote?
and not believe or not understand?
read again, how to use reference as INPUT and calculate...
+ vdda is always vdd, on your chip. you are right, this is real.
(except, you live in a movie, where you can change reality...then do something else.)
2023-06-20 09:31 PM
I checked on cubeMX
the 144 pin version has the option to select an internal reference voltage,
while the 64 pin internal reference voltage is blocked
So there is a mismatch between the specification of the component and the actual performs
My test : 3.3 VDDA and 1 volt at the ADC input
According to the value I get from ADC there is no internal voltage
Obviously, I can change the VDDA in hardware but I need for a software controlled internal reference voltage