2022-05-24 04:58 AM
HAL_SYSCFG_EnableVREFBUF();
HAL_SYSCFG_VREFBUF_HighImpedanceConfig(SYSCFG_VREFBUF_HIGH_IMPEDANCE_DISABLE);
HAL_SYSCFG_VREFBUF_VoltageScalingConfig( SYSCFG_VREFBUF_VOLTAGE_SCALE1);
2022-05-24 05:09 AM
Well, on the NUCLEO-L496ZG, VREF+ is connected to VDDA (=VDD) using a solder bridge SB149.
It should be usable if you remove SB149.
Does it answer your question?
Regards
/Peter
2022-05-30 08:28 AM
Can I use VBat pin for both RTC backup and ADC input??
2022-05-30 09:19 AM
On the NUCLEO boards, it is possible to connect VBAT to a battery and thus buffer the battery backup domain, but a solder bridge must usually be opened for this.
If this solder bridge is closed, battery buffering is not possible in any meaningful way and VBAT is connected directly to VDD or VDDA so that RTC, backup registers etc. function as long as VDD is present.
In no case is VDDA and thus VREF supplied by VBAT.
Details on the battery backup domain can be found in the reference manual RM0351.
2022-05-30 09:34 PM
we are using stm32l496zg (LQFP64) package so the VBAT pin available for RTC or ADC input??
2022-05-31 06:23 AM
The marking STM32L496ZGT stands for LQFP144, as you can see from both the data sheet and the website. VBAT is available on pin 6 of the LQFP144.
However, as I already wrote, VBAT has nothing to do with the ADC.
Regards
/Peter