Skip to content

Commit 28c2521

Browse files
zbasfabiobaltieri
authored andcommitted
drivers: adc: disabling timer after DMA eror
The ADC timer should be disabled however the read is finished. Signed-off-by: John Bason Mitchell <[email protected]>
1 parent 8501c46 commit 28c2521

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/adc/adc_stm32.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -819,6 +819,9 @@ static void dma_callback(const struct device *dev, void *user_data,
819819
LL_ADC_REG_StopConversion(adc);
820820
#endif
821821
dma_stop(data->dma.dma_dev, data->dma.channel);
822+
if (data->ctx.options.interval_us != 0U) {
823+
adc_context_disable_timer(&data->ctx);
824+
}
822825
adc_context_complete(&data->ctx, status);
823826
}
824827
}

0 commit comments

Comments
 (0)