STM32F7: stm32_adc: Do not override ADCPRE_DIV when measuring internal voltage
This commit is contained in:
parent
54eae7dcde
commit
3c0f3ea35b
@ -1277,12 +1277,12 @@ static void adc_reset(FAR struct adc_dev_s *dev)
|
|||||||
|
|
||||||
/* ADC CCR configuration */
|
/* ADC CCR configuration */
|
||||||
|
|
||||||
clrbits = ADC_CCR_ADCPRE_MASK | ADC_CCR_TSVREFE;
|
clrbits = ADC_CCR_ADCPRE_MASK | ADC_CCR_TSVREFE;
|
||||||
setbits = ADC_CCR_ADCPRE_DIV;
|
setbits = ADC_CCR_ADCPRE_DIV;
|
||||||
|
|
||||||
if (adc_internal(priv))
|
if (adc_internal(priv))
|
||||||
{
|
{
|
||||||
setbits = ADC_CCR_TSVREFE;
|
setbits |= ADC_CCR_TSVREFE;
|
||||||
}
|
}
|
||||||
|
|
||||||
clrbits |= ADC_CCR_MULTI_MASK | ADC_CCR_DELAY_MASK | ADC_CCR_DDS |
|
clrbits |= ADC_CCR_MULTI_MASK | ADC_CCR_DELAY_MASK | ADC_CCR_DDS |
|
||||||
|
Loading…
Reference in New Issue
Block a user