I am trying to use the internal reference with the ADC. I am trying the code on a TWR-KM35Z75M board the rule out a hardware problem. I modified the demo twrkm35z75m_adc16_interrupt to enable VREF. The voltage reads 1.2 VDC on the Vref pin, but I get a full scale AD reading at around 0.6VDC on the input. The result is correct if I use Vdda for reference.
I found the problem. I was using the 10 configuration of REFSEL, but it gives me the correct reading if I use the 01 configuration.