cancel
Showing results for 
Search instead for 
Did you mean: 

ADC_VRef in STM32L431RBT6

Alejandro Bizzotto
Associate III

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?

1 ACCEPTED SOLUTION

Accepted Solutions

> 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

View solution in original post

1 REPLY 1

> 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