MSP-EXP432 "Analog In" pin taking voltage from circuit
You need to make sure that the analog input pin has been configured as an analog input. If you don't, the digital circuitry will interfere with the analog function.

For the MSP432 this is typically done by setting bits in the Px.SEL0 and Px.SEL1 registers. If the analog input is bit y on port x then you need something like

Px-&gt;SEL0 |= BITy;
Px-&gt;SEL1 |= BITy;


All of the identifiers used will be defined in msp.h.