Skip to content

Commit 86de204

Browse files
aviscontigalak
authored andcommitted
drivers/dma: dma_stm32f4x: Fix Peripheral To Memory case
The Transfer Complete (TC) interrupt as well as the Memory Increment (MINC) bits were not enabled for Periperal To Memory (and Memory to Peripheral) case. Signed-off-by: Armando Visconti <armando.visconti@st.com>
1 parent dbf11be commit 86de204

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

drivers/dma/dma_stm32f4x.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,7 @@ static int dma_stm32_config_devcpy(struct device *dev, u32_t id,
312312
DMA_STM32_SCR_PBURST(dst_burst_size) |
313313
DMA_STM32_SCR_MBURST(src_burst_size) |
314314
DMA_STM32_SCR_REQ(ddata->channel_tx) |
315+
DMA_STM32_SCR_TCIE | DMA_STM32_SCR_TEIE |
315316
DMA_STM32_SCR_MINC;
316317
break;
317318
case PERIPHERAL_TO_MEMORY:
@@ -320,7 +321,9 @@ static int dma_stm32_config_devcpy(struct device *dev, u32_t id,
320321
DMA_STM32_SCR_MSIZE(dst_bus_width) |
321322
DMA_STM32_SCR_PBURST(src_burst_size) |
322323
DMA_STM32_SCR_MBURST(dst_burst_size) |
323-
DMA_STM32_SCR_REQ(ddata->channel_rx);
324+
DMA_STM32_SCR_REQ(ddata->channel_rx) |
325+
DMA_STM32_SCR_TCIE | DMA_STM32_SCR_TEIE |
326+
DMA_STM32_SCR_MINC;
324327
break;
325328
default:
326329
SYS_LOG_ERR("DMA error: Direction not supported: %d",

0 commit comments

Comments
 (0)