Skip to content

Commit 12d950b

Browse files
gautierg-stkartben
authored andcommitted
drivers: dma: configure channel in secure execution mode
Configure the DMA so it works in secure execution mode Signed-off-by: Guillaume Gautier <[email protected]>
1 parent 07fec01 commit 12d950b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

drivers/dma/dma_stm32u5.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -529,6 +529,12 @@ static int dma_stm32_configure(const struct device *dev,
529529
LL_DMA_EnableIT_HT(dma, dma_stm32_id_to_stream(id));
530530
}
531531

532+
#ifdef CONFIG_ARM_SECURE_FIRMWARE
533+
LL_DMA_ConfigChannelSecure(dma, dma_stm32_id_to_stream(id),
534+
LL_DMA_CHANNEL_SEC | LL_DMA_CHANNEL_SRC_SEC | LL_DMA_CHANNEL_DEST_SEC);
535+
LL_DMA_EnableChannelPrivilege(dma, dma_stm32_id_to_stream(id));
536+
#endif
537+
532538
LL_DMA_EnableIT_TC(dma, dma_stm32_id_to_stream(id));
533539
LL_DMA_EnableIT_USE(dma, dma_stm32_id_to_stream(id));
534540
LL_DMA_EnableIT_ULE(dma, dma_stm32_id_to_stream(id));

0 commit comments

Comments
 (0)