diff options
Diffstat (limited to 'os/hal/ports/STM32/LLD/ADCv2/hal_adc_lld.c')
-rw-r--r-- | os/hal/ports/STM32/LLD/ADCv2/hal_adc_lld.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/os/hal/ports/STM32/LLD/ADCv2/hal_adc_lld.c b/os/hal/ports/STM32/LLD/ADCv2/hal_adc_lld.c index 7c4695522..93534b2e3 100644 --- a/os/hal/ports/STM32/LLD/ADCv2/hal_adc_lld.c +++ b/os/hal/ports/STM32/LLD/ADCv2/hal_adc_lld.c @@ -384,7 +384,8 @@ void adc_lld_stop_conversion(ADCDriver *adcp) { dmaStreamDisable(adcp->dmastp);
adcp->adc->CR1 = 0;
- adcp->adc->CR2 = 0;
+ /* Because ticket #822, preserving injected conversions.*/
+ adcp->adc->CR2 &= ~(ADC_CR2_SWSTART);
adcp->adc->CR2 = ADC_CR2_ADON;
}
|