Skip to content

Commit 1348b3f

Browse files
[nrf fromtree] tests: modem: backends: uart: boards: add hw-flow-control
Update the board overlays to support hardware flow control for testing. Signed-off-by: Bjarki Arge Andreasen <[email protected]> (cherry picked from commit 525d3d6)
1 parent 684fe9d commit 1348b3f

File tree

3 files changed

+31
-3
lines changed

3 files changed

+31
-3
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
CONFIG_GPIO=y
2+
CONFIG_GPIO_HOGS=y
Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,31 @@
11
/* SPDX-License-Identifier: Apache-2.0 */
22

33
/*
4-
* The Arduino D0 and D1 must be connected to each other to loopback RX/TX.
4+
* The following bridges must be applied:
5+
*
6+
* CN2 pin 2 <-> CN2 pin 3
7+
* CN2 pin 1 <-> CN2 pin 4
8+
*
59
*/
610

11+
&gpioh {
12+
status = "okay";
13+
14+
stmod_alternate_uart {
15+
gpio-hog;
16+
gpios = <15 GPIO_ACTIVE_HIGH>;
17+
output-high;
18+
};
19+
};
20+
721
dut: &usart3 {
22+
pinctrl-0 = <&usart3_tx_pd8
23+
&usart3_rx_pd9
24+
&usart3_rts_pd12
25+
&usart3_cts_pd11>;
26+
pinctrl-names = "default";
827
dmas = <&gpdma1 0 29 STM32_DMA_PERIPH_TX
928
&gpdma1 1 28 STM32_DMA_PERIPH_RX>;
1029
dma-names = "tx", "rx";
30+
hw-flow-control;
1131
};

tests/subsys/modem/backends/uart/boards/nrf5340dk_nrf5340_cpuapp.overlay

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,25 @@
22

33
/*
44
* Pins P0.4 and P0.5 must be connected to each other to loopback RX/TX.
5+
* Pins P0.6 and P0.7 must be connected to each other to loopback RTC/CTS.
56
*/
67

78
&pinctrl {
89
uart1_default_alt: uart1_default_alt {
910
group1 {
1011
psels = <NRF_PSEL(UART_TX, 0, 4)>,
11-
<NRF_PSEL(UART_RX, 0, 5)>;
12+
<NRF_PSEL(UART_RX, 0, 5)>,
13+
<NRF_PSEL(UART_RTS, 0, 6)>,
14+
<NRF_PSEL(UART_CTS, 0, 7)>;
1215
};
1316
};
1417

1518
uart1_sleep_alt: uart1_sleep_alt {
1619
group1 {
1720
psels = <NRF_PSEL(UART_TX, 0, 4)>,
18-
<NRF_PSEL(UART_RX, 0, 5)>;
21+
<NRF_PSEL(UART_RX, 0, 5)>,
22+
<NRF_PSEL(UART_RTS, 0, 6)>,
23+
<NRF_PSEL(UART_CTS, 0, 7)>;
1924
low-power-enable;
2025
};
2126
};
@@ -24,6 +29,7 @@
2429
dut: &uart1 {
2530
compatible = "nordic,nrf-uarte";
2631
current-speed = <115200>;
32+
hw-flow-control;
2733
status = "okay";
2834
pinctrl-0 = <&uart1_default_alt>;
2935
pinctrl-1 = <&uart1_sleep_alt>;

0 commit comments

Comments
 (0)