Skip to main content
hroze.1
Associate II
June 20, 2023
Question

STM32H7A3RIT6 Voltage reference buffer (VREFBUF)

  • June 20, 2023
  • 2 replies
  • 2263 views

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

    This topic has been closed for replies.

    2 replies

    STOne-32
    Technical Moderator
    June 20, 2023

    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 

    hroze.1
    hroze.1Author
    Associate II
    June 20, 2023

    I know that the external reference voltage is VDDA
    But why can't I get an internal reference voltage?

     

    AScha.3
    Super User
    June 20, 2023

    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 :

    AScha3_0-1687281943756.png

    so need to calculate more, because take so small case . :)

    "If you feel a post has answered your question, please click ""Accept as Solution""."
    hroze.1
    hroze.1Author
    Associate II
    June 20, 2023

    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

    AScha.3
    Super User
    June 20, 2023

    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.)

    "If you feel a post has answered your question, please click ""Accept as Solution""."
    hroze.1
    hroze.1Author
    Associate II
    June 21, 2023

    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