2017-10-03 04:46 AM
Hello,
I'm using a STM32F373VCT6 and I have a problem with VBAT and ADC.
I have connected a CR2032 Batterie to the VBAT-Pin.
The RTC works fine with the batterie when the main power ist lost.But if I try to measure the VBAT-Voltage with the internal ADC1 I get always 0.
The sampling on all other channels works fine; only the ADC_CHANNEL_VBAT gives this value.
Is there anyting else to do to measure the VBAT-voltage with the internal ADC1?
I'm working with CubeMX4.22.1 and CUBE V1.9.0.Best regardsAndreas
#vbat-adc-stm32f3732017-10-03 04:57 AM
Read RM0313, 12.10 Battery voltage monitoring
The VBATEN bit in the SYSCFG_CTRL register allows the backup battery voltage on the
V BAT pin to be measured.Note also that - as that chapter states it too - the divider loads the battery significantly.
JW
2017-10-27 02:53 AM
Hello,
I found another problem at the measuring of the VBAT-Voltage with the internal ADC!
I'm using the HAL-STM32Cube_FW_F3_V1.9.0 and if I select the battery channel,
the HAL-ADC-Routines activate automatic the battery-bridge,but the routine don't switch off the bridge after measuring.I have to do this after measuring:
CLEAR_BIT(SYSCFG->CFGR1, SYSCFG_CFGR1_VBAT); // switch off battery-bridge
Otherwise the battery is empty ~one year later.
Greetings Andreas
2017-11-19 09:34 PM
Oh, boy!
I just RE-discovered this on last Friday.
On my custom stm32F446RE board.
Without the presence of VDD, VBat sinks only 0.8uA to support RTC and LSE.
(A coin cell with 220mAh can probably run until my supervisor get retired.
:(
)Once power on and the ADC internal channel hocks on VBAT,
It draws about 26uA from my coin cell. (due to internal resistor bridge for ADC circuit.)
Should had read this post first!
DON'T FORGET TO SWITCH OFF ADC VBAT CHANNEL!
.Zt