diff --git a/os/hal/ports/WB32/LLD/ADCv1/hal_adc_lld.c b/os/hal/ports/WB32/LLD/ADCv1/hal_adc_lld.c index 05e40cc6..e1f6de0f 100644 --- a/os/hal/ports/WB32/LLD/ADCv1/hal_adc_lld.c +++ b/os/hal/ports/WB32/LLD/ADCv1/hal_adc_lld.c @@ -265,7 +265,7 @@ void adc_lld_start_conversion(ADCDriver *adcp) { void adc_lld_stop_conversion(ADCDriver *adcp) { dmaStreamDisable(adcp->dmastp); - adcp->adc->CR2 = 0; + rccResetADC(); } #endif /* HAL_USE_ADC */ diff --git a/os/hal/ports/WB32/LLD/DMAv1/wb32_dma.c b/os/hal/ports/WB32/LLD/DMAv1/wb32_dma.c index fd9bbcf1..4d1a7400 100644 --- a/os/hal/ports/WB32/LLD/DMAv1/wb32_dma.c +++ b/os/hal/ports/WB32/LLD/DMAv1/wb32_dma.c @@ -466,6 +466,8 @@ void dmaServeInterrupt(const wb32_dma_stream_t *dmastp) { dma.streams[selfindex].func(dma.streams[selfindex].param, IT_flag); } } + + dmaStreamClearInterrupt(dmastp); } #endif /* WB32_DMA_REQUIRED */