mirror of https://github.com/ARMmbed/mbed-os.git
STM32F4: Set ADC sample time to max value for VRefInt
parent
99a8467b70
commit
d0fce353cc
|
@ -180,11 +180,12 @@ static inline uint16_t adc_read(analogin_t *obj)
|
||||||
break;
|
break;
|
||||||
case 17:
|
case 17:
|
||||||
sConfig.Channel = ADC_CHANNEL_VREFINT;
|
sConfig.Channel = ADC_CHANNEL_VREFINT;
|
||||||
|
/* From experiment, measurement needs max sampling time to be valid */
|
||||||
|
sConfig.SamplingTime = ADC_SAMPLETIME_480CYCLES;
|
||||||
break;
|
break;
|
||||||
case 18:
|
case 18:
|
||||||
sConfig.Channel = ADC_CHANNEL_VBAT;
|
sConfig.Channel = ADC_CHANNEL_VBAT;
|
||||||
/* From experiment, VBAT measurement needs max
|
/* From experiment, measurement needs max sampling time to be valid */
|
||||||
* sampling time to be avlid */
|
|
||||||
sConfig.SamplingTime = ADC_SAMPLETIME_480CYCLES;
|
sConfig.SamplingTime = ADC_SAMPLETIME_480CYCLES;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in New Issue