Analog input on RAK11720

Hi,
I have built a custom board with RAK11720 and have hooked up a voltage divider output to pin GP13/ADC8. Input voltage to the voltage divider is around 5V and the output of 422K/330K voltage divider is 2.106V. This is the voltage on the pin of the module that I can measure with multimeter.
I have tried both:
int battV = analogRead(P13);
and
float battV = api.system.bat.get();

Both are giving wrong values. The analogRead is returning 1023 which is maximum for a 10-bit ADC and the api.system.bat.get() returns 8.1V.

The 1023 is hinting that even 2.1V is more than the maximum allowed on the analog pin.

What is the voltage limit on the analog pins of RAK11720? Is there a built-in voltage divider on the RAK11720 module and RUI api somehow takes into account of it when returning a floating point number?

Any guidance you can provide is appreciated.

Thanks.
-Owais

There are no resistors on the analog pins inside the RAK11720.

The Apollo3 Blue SoC has a max input voltage of 1.5V on its ADC inputs and you need an external voltage divider for higher voltages. See Apoolo3-Blue-SoC-Datasheet released by Ambiq.

Thank you Beegee.
I think at power-on the RUI4.2.4 firmware defaults the micro to 2.0V. I can now measure voltages up to 2.0V.
One thing I like to add is the issue of reading voltages after waking up from api.system.sleep.all(). I had to make the analog input pin as input using pinMode(WB_A0, INPUT) to be able to read any voltage. What I noticed is that after the unit wakes up, the pin is internally wired to ground. Probably as an output driven low. This is because, unless I explicitly make it an input, the output of voltage divider sinks to zero. After I added the pinMode() and also a few ms delay between turning on the voltage divider and reading the voltage, it seems to be working as expected.
We can close this and mark as Solution.
Thanks for your help.
-Owais