We are using the KL27Z256VFT4 in a project currently in development. It seems that the VREFH cannot be used with an external reference. When attempting to use a 2.5 volt reference connected to VREFH the adc conversion consistently reads 0xFF. I have verified that the internal reference is off and that the source for the ADC reference is set to the VREFH/VREFL pair. Is there something I am missing?
Hi Seth,
This device contains dedicated VREFH and VREFL pins on 64-pin and 48-pin(KL27Z256VFT4) packages.
So I think it's ok to use external reference on VREFH.
The output of On-chip 1.2V high precision voltage reference VREF_OUT shares with VREFH on 64-pin and 48-pin packages. When VREF_OUT is enabled, this pin needs to connect a capacitor to ground.
So you need to check if it was disabled or not.(SIM_SCGC4[VREF]=0)
And set ADCx_SC2[REFSEL]=00 Default voltage reference pin pair, that is, external pins VREFH and VREFL
If you are testing the adc example in SDK2.x, please notice the '#define BOARD_ADC_USE_ALT_VREF 1U' in board.h
Please connect 1v at ADC input pin, what value will you get?
Best Regards,
Robin
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------