Skip to content

Commit

Permalink
drivers: dma: u5: fix dma reload
Browse files Browse the repository at this point in the history
In dma_stm32_reload, the size is the number of bytes and not number
of elements.

Signed-off-by: Franck Thebault <franck.thebault@st.com>
Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
  • Loading branch information
marwaiehm-st committed May 23, 2024
1 parent 1bdb02c commit 9ee8354
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions drivers/dma/dma_stm32u5.c
Original file line number Diff line number Diff line change
Expand Up @@ -543,13 +543,7 @@ static int dma_stm32_reload(const struct device *dev, uint32_t id,
dma_stm32_id_to_stream(id),
src, dst);

if (stream->source_periph) {
LL_DMA_SetBlkDataLength(dma, dma_stm32_id_to_stream(id),
size / stream->src_size);
} else {
LL_DMA_SetBlkDataLength(dma, dma_stm32_id_to_stream(id),
size / stream->dst_size);
}
LL_DMA_SetBlkDataLength(dma, dma_stm32_id_to_stream(id), size);

/* When reloading the dma, the stream is busy again before enabling */
stream->busy = true;
Expand Down

0 comments on commit 9ee8354

Please sign in to comment.