I am using mkl26z256vlh4 in which I am specifically observing pin 29 of port E i.e./ADC0_SE4B, my purpose is to get voltage of this pin and decide further action, but I am not getting stable ADC values. I am using 3.3v Vref and input is 3.3v.
I have configured it as 12bit ADC. I have enabled average mode for 32 samples which is giving me a more stable output than previous but the ADC values reading after averaging is differing than actual voltage of that pc. and one more thing i am using voltage divider with R1=470K R2=220K.
#define DEMO_ADC16_BASE ADC0
#define DEMO_ADC16_CHANNEL_GROUP 0U
#define DEMO_ADC16_USER_CHANNEL 4U /* PTE29, ADC0_SE29_4B */
this is how I have defined ADC channel, is user channel correct for mentioned pin?
omkar