Skip to content

Commit 42548f3

Browse files
authored
Merge pull request #4691 from LMESTM/analogin_sample_time
STM32: F4: Increase ADC sampling time for VBAT
2 parents 06ff4f8 + f8d6f95 commit 42548f3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

targets/TARGET_STM/TARGET_STM32F4/analogin_api.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,9 @@ static inline uint16_t adc_read(analogin_t *obj)
188188
break;
189189
case 18:
190190
sConfig.Channel = ADC_CHANNEL_VBAT;
191+
/* From experiment, VBAT measurement needs max
192+
* sampling time to be avlid */
193+
sConfig.SamplingTime = ADC_SAMPLETIME_480CYCLES;
191194
break;
192195
default:
193196
return 0;

0 commit comments

Comments
 (0)