drivers: dma: cyclic dma handling
keeping the stream busy when cyclic DMA is used. Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
This commit is contained in:
parent
bda1970b33
commit
ed92eeb3c8
1 changed files with 3 additions and 1 deletions
|
|
@ -274,7 +274,9 @@ static void dma_stm32_irq_handler(const struct device *dev, uint32_t id)
|
||||||
stream->dma_callback(dev, stream->user_data, callback_arg, DMA_STATUS_BLOCK);
|
stream->dma_callback(dev, stream->user_data, callback_arg, DMA_STATUS_BLOCK);
|
||||||
} else if (stm32_dma_is_tc_irq_active(dma, id)) {
|
} else if (stm32_dma_is_tc_irq_active(dma, id)) {
|
||||||
/* Assuming not cyclic transfer */
|
/* Assuming not cyclic transfer */
|
||||||
stream->busy = false;
|
if (stream->cyclic == false) {
|
||||||
|
stream->busy = false;
|
||||||
|
}
|
||||||
/* Let HAL DMA handle flags on its own */
|
/* Let HAL DMA handle flags on its own */
|
||||||
if (!stream->hal_override) {
|
if (!stream->hal_override) {
|
||||||
dma_stm32_clear_tc(dma, id);
|
dma_stm32_clear_tc(dma, id);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue