RAK3172 PB4 pin as ADC

Hi,

We are using RAK3172 module pin 31 (PB4) for ADC. We selected supply voltage (3.3V) as a reference. It is observed that we get 90 counts without applying any input voltage to an ADC pin. We connected PB4 to the ground, and we are still getting 90 counts. Can you please suggest what is going wrong ?

Thanks & Regards,
Dattatray

Welcome to RAK forum @Dattatray ,

I did some test on the RAK3172 PB4 and I can get 0 count when I connect it to ground.

image

Can you please share what code you use and also the schematic of your board? Could it be some grounding issues?