AnsweredAssumed Answered

ADC samples fluctation for Constant input voltage

Question asked by Vaibhavi P on Dec 31, 2019
Latest reply on Apr 26, 2020 by Vaibhavi P


I am working on 12 bit ADC with custom board which has MK22FX512AVLQ controller. When I am giving a constant voltage to ADC, I am observing a considerable fluctuation in the samples.

The 3.3 V supply to the controller is stable. The voltage at the ADC input pin is also constant.

On the hardware side:

I have a RC on the ADC pin with R = 100Ohm and C = 220pF. I have also tried changing this capacitor to 1uF keeping R the same. I also tried adding 100nF Capacitor on VREF_OUT pin (pin number 37). But no improvement was observed.

On software side:

Clock configuration is as follows :

Core clock : 80MHz

Bus clock: 40MHz


ADC configuration is as follows:

                adc16_config_t s_adc_config;



                s_adc_config.clockSource = kADC16_ClockSourceAlt0;/*Bus clock 40 Mhz*/

                s_adc_config.clockDivider = kADC16_ClockDivider4;/*Divided by 4*/

                s_adc_config.longSampleMode = kADC16_LongSampleDisabled;

                uint32_t ui32_freq;

                ui32_freq = CLOCK_GetFreq(kCLOCK_BusClk);

                ADC16_Init(ADC_BASE, &s_adc_config);

                while(kStatus_Success != ADC16_DoAutoCalibration( ADC_BASE ));





                uint32_t ui32_temp;

                ui32_temp =  ADC16_GetChannelConversionValue(ADC_BASE, ADC_CHANNEL_GROUP);

                ADC16_EnableHardwareTrigger(ADC_BASE, false); /* Make sure the software trigger is used. */

                ADC16_EnableDMA(ADC_BASE, true);

I have tried doing following modification on the software side,

  1. Changing Buc clock frequency
  2. Changing prescaler of the ADC clock
  3. Changing the sampling period (long sampling enabled)
  4. Adding an intentional delay after the auto caliberation function returns Success status

Still the fluctations persist.

I have attached the schematic and test results data for the reference.

Please help in resolving the issue.


Thanks and Best Regards,