AnsweredAssumed Answered

[MKW01] ADC strange behavior in differential mode

Question asked by Giancarlo Zanuz on Apr 11, 2018
Latest reply on Apr 18, 2018 by Jorge Antonio Alcala Vazquez



I'm having some issues when using the ADC of the MKW01Z128 in differential mode. In this mode, when I put any voltage between pins PTE18-PTE19 the samples oscilates as you can see in the picture bellow. The same behavior don't occur when in single mode for the same pins individually:



For this test I used a voltage divisor around 975mV, and I'm using a voltage reference of 1.5V as VREFH.

I'm using the ADC in One-Time-Trigger mode, with resolution of 16bits:


    adc16_calibration_param_t userCalConfig;


    adc16_converter_config_t userConvConfig;
    userConvConfig.lowPowerEnable = false;
    userConvConfig.clkDividerMode = kAdc16ClkDividerOf8;
    userConvConfig.longSampleTimeEnable = true;
    userConvConfig.resolution = kAdc16ResolutionBitOf16;        /* 16bits */
    userConvConfig.clkSrc = kAdc16ClkSrcOfAsynClk;
    userConvConfig.asyncClkEnable = true;
    userConvConfig.highSpeedEnable = false;
    userConvConfig.longSampleCycleMode = kAdc16LongSampleCycleOf24;
    userConvConfig.hwTriggerEnable = false;
    userConvConfig.refVoltSrc = kAdc16RefVoltSrcOfVref;
    userConvConfig.continuousConvEnable = false;
    userConvConfig.dmaEnable = false;
#endif /* FSL_FEATURE_ADC16_HAS_DMA */


    if(kStatus_ADC16_Success != ADC16_DRV_Init(ADC16_0_IDX, &userConvConfig))
        return false;


    /* Execute the auto-calibration */
    if (kStatus_ADC16_Success != ADC16_DRV_GetAutoCalibrationParam(ADC16_0_IDX, &userCalConfig))
        return false;
    ADC16_DRV_SetCalibrationParam(ADC16_0_IDX, &userCalConfig);


What else can it be? Thanks.