2009-04-08 09:09 PM
Safe ADC recalibration
2011-05-17 04:09 AM
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)?