I'll state the obvious first, in case anyone needs some background.
I am working with the Torpedo DM3730 SOM which has an integrated PMIC (Tps65950). According to the PMIC, we can stick a coin cell to the backup battery to keep the RTC running. Then the voltage of the coin cell can be read using MADC CH9.
In the Linux BSP User Guide, it offers a script to do exactly just this. I have ran the script and I am able to read the ADC values for CH9 and the script also converts the ADC readings to milliVolts.
Our coin cell has a measured voltage of 3V from a Voltmeter. The script actually reports that the ADC reading is 3.2 volts. This caused me to do further experiments. I modified the BB_SEL bits (Backup battery charging voltage) to 0x00 (2.5V).
Then I re-ran the script. This time it reports back 2.5V.
It tried the other settings for BB_SEL and it is starting to appear that the ADC reading in CH9 just simply reports back the Backup battery charging voltage rather than the ACTUAL coin cell voltage.
Is this actually the expected behavior? Because our EE design team was actually expecting our software to report the ACTUALy coin cell voltage, not the charging voltage setting.
BTW, the coin cell is directly connected to the backup battery ports. There is nothing (like a diode) in between or anything sinking sinking the charge current.