Merge pull request #4929 from bcostm/adc_sampletime_vrefint

STM32F4: Increase ADC sample time for VREF
pull/4983/head
Jimmy Brisson 2017-09-05 11:15:53 -05:00 committed by GitHub
commit 94fb4a3aad
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: