Skip to main content
johnmcgavin9
Associate
April 9, 2009
Question

Safe ADC recalibration

  • April 9, 2009
  • 1 reply
  • 568 views
Posted on April 09, 2009 at 06:09

Safe ADC recalibration

    This topic has been closed for replies.

    1 reply

    johnmcgavin9
    Associate
    May 17, 2011
    Posted on May 17, 2011 at 13:09

    Whenever i try to periodically recalibrate my adcs the results seem to go out of wack or the systems hangs. What do should i be doing to do this safely/correctly?

    Using continuous dual reg simultaneous mode with DMA, lib v2.

    Code:

    ADC_SoftwareStartConvCmd(ADC1, DISABLE);

    ADCCalibration();

    ADC_SoftwareStartConvCmd(ADC1, ENABLE);

    Code:

    void ADCCalibration(void)

    {

    ADC_ResetCalibration(ADC1);

    ADC_ResetCalibration(ADC2);

    while((ADC_GetResetCalibrationStatus(ADC1)) || (ADC_GetResetCalibrationStatus(ADC2))){;}

    /* Start the ADC Calibration */

    ADC_StartCalibration(ADC1);

    ADC_StartCalibration(ADC2);

    while((ADC_GetCalibrationStatus(ADC1)) || (ADC_GetCalibrationStatus(ADC2))){;}

    }

    Should i turn them off (ADC_Cmd(ADCx, DISABLE) like)?