STM32F7: stm32_adc: Do not override ADCPRE_DIV when measuring internal voltage

This commit is contained in:
Juha Niskanen 2017-04-18 06:51:20 -06:00 committed by Gregory Nutt
parent 54eae7dcde
commit 3c0f3ea35b

View File

@ -1277,12 +1277,12 @@ static void adc_reset(FAR struct adc_dev_s *dev)
/* ADC CCR configuration */
clrbits = ADC_CCR_ADCPRE_MASK | ADC_CCR_TSVREFE;
setbits = ADC_CCR_ADCPRE_DIV;
clrbits = ADC_CCR_ADCPRE_MASK | ADC_CCR_TSVREFE;
setbits = ADC_CCR_ADCPRE_DIV;
if (adc_internal(priv))
{
setbits = ADC_CCR_TSVREFE;
setbits |= ADC_CCR_TSVREFE;
}
clrbits |= ADC_CCR_MULTI_MASK | ADC_CCR_DELAY_MASK | ADC_CCR_DDS |