After switching on, the reference takes some time to settle. As long as it is still below your input voltage, you will always get 0x3FF. You call wait(1), but depending on implementation of this function, it might be optimized away by the compiler (as it does nothing but wasting time)
In single-channel-single-conversion mode, you don't need to toggle ENC. After the conversion, ADC10SC clears and setting it again will trigger the next conversion.