Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 4 additions & 9 deletions drivers/dma/dma_stm32.c
Original file line number Diff line number Diff line change
Expand Up @@ -518,11 +518,15 @@ DMA_STM32_EXPORT_API int dma_stm32_configure(const struct device *dev,
/* Enable transfer complete ISR if in non-cyclic mode or a callback is requested */
if (!stream->cyclic || stream->dma_callback != NULL) {
LL_DMA_EnableIT_TC(dma, dma_stm32_id_to_stream(id));
} else {
LL_DMA_DisableIT_TC(dma, dma_stm32_id_to_stream(id));
}

/* Enable Half-Transfer irq if circular mode is enabled and a callback is requested */
if (stream->cyclic && stream->dma_callback != NULL) {
LL_DMA_EnableIT_HT(dma, dma_stm32_id_to_stream(id));
} else {
LL_DMA_DisableIT_HT(dma, dma_stm32_id_to_stream(id));
}

#if defined(CONFIG_DMA_STM32_V1)
Expand Down Expand Up @@ -642,15 +646,6 @@ DMA_STM32_EXPORT_API int dma_stm32_stop(const struct device *dev, uint32_t id)
return 0;
}

#if !defined(CONFIG_DMAMUX_STM32) \
|| defined(CONFIG_SOC_SERIES_STM32H7X) || defined(CONFIG_SOC_SERIES_STM32MP1X)
LL_DMA_DisableIT_TC(dma, dma_stm32_id_to_stream(id));
#endif /* CONFIG_DMAMUX_STM32 */

#if defined(CONFIG_DMA_STM32_V1)
stm32_dma_disable_fifo_irq(dma, id);
#endif

dma_stm32_clear_stream_irq(dev, id);
dma_stm32_disable_stream(dma, id);

Expand Down
Loading