2014-09-22 03:33 AM
I have a lithium battery connected to the VBAT pin and i would like
to monitor that voltage by software to give a warning when the time to replace it is reached. I have found no Lo-Bat bit, as known from external clock chips and the vbat pin seems not internally connected to any adc input multiplexer. The STM32F2.. series can monitor this through an adc channel. Does anyone know what to do here?2014-09-22 09:00 AM
I measured an ADC channel input impedance on a medium density F105, power off, of approximately 1.3 MOhms. So, if you connect the battery directly to an ADC channel, the power off leakage current will be greater than the 1.5 uA Backup Domain power off current.
If you have the board space, one option is to use a high impedance relay switch to connect the battery output to an ADC input channel. Another option is to predict battery useful life considering the percentage of time the processor will be powered off, then replace the battery some non-critical time before that when Backup Domain data can also be restored. Cheers, Hal