cancel
Showing results for 
Search instead for 
Did you mean: 

Hi, I have a board with an external VREF+ at 2.5 V. The processor is a stm32H743ZI. I would like to know which registers and which values i have to configure for using ADC with external VREF. Thanks Théo Campas

TCamp.1
Associate
 
2 REPLIES 2
Mike_ST
ST Employee

In the H7 HAL library, there is the following function, maybe VREFBUF->CSR is the register taht you want to check.

/**

 * @brief Configure the internal voltage reference buffer high impedance mode.

 * @param Mode specifies the high impedance mode

 *         This parameter can be one of the following values:

 *           @arg SYSCFG_VREFBUF_HIGH_IMPEDANCE_DISABLE: VREF+ pin is internally connect to VREFINT output.

 *           @arg SYSCFG_VREFBUF_HIGH_IMPEDANCE_ENABLE: VREF+ pin is high impedance.

 * @retval None

 */

void HAL_SYSCFG_VREFBUF_HighImpedanceConfig(uint32_t Mode)

{

 /* Check the parameters */

 assert_param(IS_SYSCFG_VREFBUF_HIGH_IMPEDANCE(Mode));

 MODIFY_REG(VREFBUF->CSR, VREFBUF_CSR_HIZ, Mode);

}

houssemeddine
Associate II

Hello @Théo Campas (Community Member)

Thank you for raising the question,

Actually, the VREFBUF_CSR register should be configured first to be able to configure the Voltage Reference for the ADC.

In your case, to use an External VREF, you need to use the combination mentioned below, which is the default configuration:

  • ENVR bit = 0
  • HIZ bit = 1

Please refer to the "VREF buffer modes" table in the Reference Manual for the other possible configurations.

Hope my answer helped you.

Houssem.