Is there a recommended strategy for monitoring battery level if the device is powered from a regulator (i.e. VBAT pin is at the regulated voltage)? It seems that feeding a voltage higher than VBAT into any port would damage the part, so in order to make use of the internal ADC for battery measurement we would need some external circuit. Is there a recommended solution to this problem?
The best I could come up with was a voltage divider and a transistor to turn it on, but this would also require modification of the built-in battery monitoring code to switch on the transistor.
Has anyone come up with a good solution to this problem?