cancel
Showing results for 
Search instead for 
Did you mean: 

Safe ADC recalibration

johnmcgavin9
Associate II
Posted on April 09, 2009 at 06:09

Safe ADC recalibration

1 REPLY 1
johnmcgavin9
Associate II
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)?