Skip to content

Commit 94fb4a3

Browse files
Merge pull request #4929 from bcostm/adc_sampletime_vrefint
STM32F4: Increase ADC sample time for VREF
2 parents 5bddd88 + d0fce35 commit 94fb4a3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

targets/TARGET_STM/TARGET_STM32F4/analogin_api.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,11 +180,12 @@ static inline uint16_t adc_read(analogin_t *obj)
180180
break;
181181
case 17:
182182
sConfig.Channel = ADC_CHANNEL_VREFINT;
183+
/* From experiment, measurement needs max sampling time to be valid */
184+
sConfig.SamplingTime = ADC_SAMPLETIME_480CYCLES;
183185
break;
184186
case 18:
185187
sConfig.Channel = ADC_CHANNEL_VBAT;
186-
/* From experiment, VBAT measurement needs max
187-
* sampling time to be avlid */
188+
/* From experiment, measurement needs max sampling time to be valid */
188189
sConfig.SamplingTime = ADC_SAMPLETIME_480CYCLES;
189190
break;
190191
default:

0 commit comments

Comments
 (0)