We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 9673ac1 + ee8489f commit f51bbe0Copy full SHA for f51bbe0
targets/TARGET_STM/TARGET_STM32WB/analogin_device.c
@@ -194,6 +194,11 @@ uint16_t adc_read(analogin_t *obj)
194
if (HAL_ADC_PollForConversion(&obj->handle, 10) == HAL_OK) {
195
adcValue = (uint16_t)HAL_ADC_GetValue(&obj->handle);
196
}
197
+
198
+ if (HAL_ADC_Stop(&obj->handle) != HAL_OK) {
199
+ debug("HAL_ADC_Stop failed\r\n");
200
+ }
201
202
LL_ADC_SetCommonPathInternalCh(__LL_ADC_COMMON_INSTANCE((&obj->handle)->Instance), LL_ADC_PATH_INTERNAL_NONE);
203
return adcValue;
204
0 commit comments