2021-07-06 12:45 AM
2021-07-06 01:39 AM
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);
}
2021-07-06 01:42 AM
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:
Please refer to the "VREF buffer modes" table in the Reference Manual for the other possible configurations.
Hope my answer helped you.
Houssem.