STM32F4: Set ADC sample time to max value for VRefInt

pull/4929/head
bcostm 2017-08-17 16:12:16 +02:00
parent 99a8467b70
commit d0fce353cc
1 changed files with 3 additions and 2 deletions

View File

@ -180,11 +180,12 @@ static inline uint16_t adc_read(analogin_t *obj)
break;
case 17:
sConfig.Channel = ADC_CHANNEL_VREFINT;
/* From experiment, measurement needs max sampling time to be valid */
sConfig.SamplingTime = ADC_SAMPLETIME_480CYCLES;
break;
case 18:
sConfig.Channel = ADC_CHANNEL_VBAT;
/* From experiment, VBAT measurement needs max
* sampling time to be avlid */
/* From experiment, measurement needs max sampling time to be valid */
sConfig.SamplingTime = ADC_SAMPLETIME_480CYCLES;
break;
default: