[MKW01] ADC strange behavior in differential mode

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

[MKW01] ADC strange behavior in differential mode

ソリューションへジャンプ
1,591件の閲覧回数
giancarlozanuz
Contributor III

Hello,

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:

ADC plot.png

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:

#if FSL_FEATURE_ADC16_HAS_CALIBRATION
    adc16_calibration_param_t userCalConfig;
#endif /* FSL_FEATURE_ADC16_HAS_CALIBRATION */

    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;
#if FSL_FEATURE_ADC16_HAS_DMA
    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 FSL_FEATURE_ADC16_HAS_CALIBRATION
    if (kStatus_ADC16_Success != ADC16_DRV_GetAutoCalibrationParam(ADC16_0_IDX, &userCalConfig))
        return false;
    ADC16_DRV_SetCalibrationParam(ADC16_0_IDX, &userCalConfig);
#endif /* FSL_FEATURE_ADC16_HAS_CALIBRATION */

What else can it be? Thanks.

ラベル(1)
タグ(2)
0 件の賞賛
返信
1 解決策
1,357件の閲覧回数
jorge_a_vazquez
NXP Employee
NXP Employee

Hi Giancarlo

As it is mentioned in the datasheet, your ADC input voltage has to be Min VREFL and Max VREFH, this voltage is the one that is taken as the reference to sample the ADC input, so these voltages must have the same ground reference.

pastedImage_7.png

Best regards

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
1,357件の閲覧回数
giancarlozanuz
Contributor III

I've found something about this, but I'm still confused. This is the simplified test circuit that is produting that odd oscillating graph:

CIRCUIT1.PNG

But when I connect the same GND to ADC- channel, it works:

CIRCUIT2.PNG

You can see below the comparison graph of both circuits, for 1V on PTE18-PTE19:

ADC TEST.png

But since I'm working with the ADC in differential mode, why do I need to connect the common GND on the negative input of the ADC?

0 件の賞賛
返信
1,358件の閲覧回数
jorge_a_vazquez
NXP Employee
NXP Employee

Hi Giancarlo

As it is mentioned in the datasheet, your ADC input voltage has to be Min VREFL and Max VREFH, this voltage is the one that is taken as the reference to sample the ADC input, so these voltages must have the same ground reference.

pastedImage_7.png

Best regards

0 件の賞賛
返信