Skip to content

Commit 51aba7f

Browse files
djiatsaf-stcfriedt
authored andcommitted
samples: drivers: uart: async_api: add stm32 platform overlays
Configure and attach DMA for each platform's USART to enable asynchronous UART communication. Signed-off-by: Fabrice DJIATSA <[email protected]>
1 parent 7391cfa commit 51aba7f

21 files changed

+310
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/*
2+
* Copyright (c) 2025 STMicroelectronics
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
dut: &usart1 {
8+
dmas = <&gpdma1 0 25 STM32_DMA_PERIPH_TX>,
9+
<&gpdma1 1 24 STM32_DMA_PERIPH_RX>;
10+
dma-names = "tx", "rx";
11+
};
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/*
2+
* Copyright (c) 2025 STMicroelectronics
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
dut: &usart1 {
8+
dmas = <&dma2 6 2 (STM32_DMA_PERIPH_TX | STM32_DMA_PRIORITY_HIGH)>,
9+
<&dma2 7 2 (STM32_DMA_PERIPH_RX | STM32_DMA_PRIORITY_HIGH)>;
10+
dma-names = "tx", "rx";
11+
};
12+
13+
&dma2 {
14+
status = "okay";
15+
};
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/*
2+
* Copyright (c) 2025 STMicroelectronics
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
&usart2 {
8+
dmas = <&dmamux1 3 53 STM32_DMA_PERIPH_TX>,
9+
<&dmamux1 4 52 STM32_DMA_PERIPH_RX>;
10+
dma-names = "tx", "rx";
11+
};
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/*
2+
* Copyright (c) 2025 STMicroelectronics
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
dut: &usart2 {
8+
dmas = <&dma1 2 (STM32_DMA_PERIPH_TX | STM32_DMA_PRIORITY_HIGH)>,
9+
<&dma1 1 (STM32_DMA_PERIPH_RX | STM32_DMA_PRIORITY_HIGH)>;
10+
dma-names = "tx", "rx";
11+
};
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/*
2+
* Copyright (c) 2025 STMicroelectronics
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
dut: &usart1 {
8+
dmas = <&dma1 4 (STM32_DMA_PERIPH_TX | STM32_DMA_PRIORITY_HIGH)>,
9+
<&dma1 5 (STM32_DMA_PERIPH_RX | STM32_DMA_PRIORITY_HIGH)>;
10+
dma-names = "tx", "rx";
11+
};
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/*
2+
* Copyright (c) 2025 STMicroelectronics
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
dut: &usart3 {
8+
dmas = <&dma1 3 4 STM32_DMA_PERIPH_TX STM32_DMA_FIFO_FULL>,
9+
<&dma1 1 4 STM32_DMA_PERIPH_RX STM32_DMA_FIFO_FULL>;
10+
dma-names = "tx", "rx";
11+
};
12+
13+
&dma1 {
14+
status = "okay";
15+
};
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/*
2+
* Copyright (c) 2025 STMicroelectronics
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
dut: &usart3 {
8+
dmas = <&dma1 3 4 STM32_DMA_PERIPH_TX STM32_DMA_FIFO_FULL>,
9+
<&dma1 1 4 STM32_DMA_PERIPH_RX STM32_DMA_FIFO_FULL>;
10+
dma-names = "tx", "rx";
11+
};
12+
13+
&dma1 {
14+
status = "okay";
15+
};
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/*
2+
* Copyright (c) 2025 STMicroelectronics
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
dut: &usart3 {
8+
dmas = <&dma1 3 4 STM32_DMA_PERIPH_TX STM32_DMA_FIFO_FULL>,
9+
<&dma1 1 4 STM32_DMA_PERIPH_RX STM32_DMA_FIFO_FULL>;
10+
dma-names = "tx", "rx";
11+
};
12+
13+
&dma1 {
14+
status = "okay";
15+
};
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/*
2+
* Copyright (c) 2025 STMicroelectronics
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
&usart2 {
8+
dmas = <&dmamux1 5 53 STM32_DMA_PERIPH_TX>,
9+
<&dmamux1 4 52 STM32_DMA_PERIPH_RX>;
10+
dma-names = "tx", "rx";
11+
};
12+
13+
&dma1 {
14+
status = "okay";
15+
};
16+
17+
&dmamux1 {
18+
status = "okay";
19+
};
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/*
2+
* Copyright (c) 2025 STMicroelectronics
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
dut: &lpuart1 {
8+
dmas = <&dmamux1 2 35 STM32_DMA_PERIPH_TX>,
9+
<&dmamux1 1 34 STM32_DMA_PERIPH_RX>;
10+
dma-names = "tx", "rx";
11+
};
12+
13+
&dma1 {
14+
status = "okay";
15+
};
16+
17+
&dmamux1 {
18+
status = "okay";
19+
};

0 commit comments

Comments
 (0)