Try to add ~10n bypassing capacitor on the ADC input pin and see if it helps
Does the ADC hanging issue fixed by now?
The ADC hanging issue has been fixed.
It was a uint16 variable that was attaining a -ve value during runtime. After changing the type from uint16 to int, the program works correctly.
The only thing surprising is why touching a physical pin would effect firmware error!