Re: Discharging the battery for the FSE clock
Posted: Sun Jul 14, 2024 6:23 am
if you use an soc in the stm32f4xx or g4xx series e.g. stm32f401/f411
the ADC can read VBAT internally
https://www.st.com/resource/en/referenc ... ronics.pdf
the ADC can read VBAT internally
https://www.st.com/resource/en/referenc ... ronics.pdf
This feature is not there in the stm32f103. But that stm32f4 has a different RTC, and different structure for the registers.11.10 Battery charge monitoring
The VBATE bit in the ADC_CCR register is used to switch to the battery voltage. As the
VBAT voltage could be higher than VDDA, to ensure the correct operation of the ADC, the
VBAT pin is internally connected to a bridge divider.
When the VBATE is set, the bridge is automatically enabled to connect:
• VBAT/4 to the ADC1_IN18 input channel
Note: The VBAT and temperature sensor are connected to the same ADC internal channel
(ADC1_IN18). Only one conversion, either temperature sensor or VBAT, must be selected
at a time. When both conversion are enabled simultaneously, only the VBAT conversion is
performed.