I am attempting to use the FRDM-KL03Z ADC with the internal voltage reference instead of V_REFH which is tied to VDD inside the chip.
I have the ADC running fine with the VREFH voltage at VDD = 3.3 V.
I want to instead use the internal voltage reference of 1.2 V.
I have tried the following to change over to the voltage reference:
1) Set PMC_HAL_SetBandgapInLowPowerModeCmd(baseAddr, 1); to enable the voltage reference.
2) Set PMC_HAL_SetBandgapBufferCmd(baseAddr, 1); to enable the voltage reference buffer.
3) Set ADC16_HAL_SetRefVoltSrcMode(baseAddr, 1U); to select the alternative reference pair of ValtH and ValtL.
After doing this the ADC producing exactly the same readings as before indicating that it is still using the old reference. Am I missing anything important here?
Thanks for the fast reply. I get a voltage that floats around 0.05 V when measuring PTB2 with my meter.
I believe this is wrong and is likely causing the problem. Am I right in thinking that the capacitor required for V_REF is already installed on the FRDM-KL03Z board?
Do you have any suggestions on how I can troubleshoot this further?