Skip to main content
Alejandro Bizzotto_36523
Associate III
May 25, 2021
Solved

ADC_VRef in STM32L431RBT6

  • May 25, 2021
  • 1 reply
  • 707 views

I'm trying to use the internal reference voltage of 2.048V in my application, since I'm powering the microcontroller with 2.8V. But when I select the reference source and enable the VRefBuff with this lines:

 HAL_SYSCFG_VREFBUF_VoltageScalingConfig(SYSCFG_VREFBUF_VOLTAGE_SCALE0);
 HAL_SYSCFG_VREFBUF_HighImpedanceConfig(SYSCFG_VREFBUF_HIGH_IMPEDANCE_DISABLE);
 if (HAL_SYSCFG_EnableVREFBUF() != HAL_OK)
 {
 Error_Handler();
 }

the microcontroller will go directly to the error handler. Is this because in this package the VRef is bonded to VDDA? meaning I will only be able to use VDDA as reference in this chip?

This topic has been closed for replies.
Best answer by waclawek.jan

> Is this because in this package the VRef is bonded to VDDA? meaning I will only be able to use VDDA as reference in this chip?

This means, that you cannot use internal VREF as reference to the ADC, you have to use VDDA.

But you still can measure the internal VREF's voltage against the VDDA, thus eliminate the need to know VDDA's voltage precisely. You have to make sure VDDA is stable enough.

JW

1 reply

waclawek.jan
waclawek.janBest answer
Super User
May 25, 2021

> Is this because in this package the VRef is bonded to VDDA? meaning I will only be able to use VDDA as reference in this chip?

This means, that you cannot use internal VREF as reference to the ADC, you have to use VDDA.

But you still can measure the internal VREF's voltage against the VDDA, thus eliminate the need to know VDDA's voltage precisely. You have to make sure VDDA is stable enough.

JW