Skip to content

Commit 585fb2a

Browse files
fkokosinskinashif
authored andcommitted
boards/arduino/portenta_h7: enable USART1 on M4
Right now, USART1 is enabled on the M7 target variant by default, leaving M4 without a UART to use; this is the way this port was originally contributed. Since then, USB was enabled on M7, changing the console backend from USART1 to USB CDC ACM; the M4 target was left unchanged. This commit enabled USART1 on the M4 variant and disabled it on the M7 variant, so that the M4 variant can use it as its console backend. Note that, for the M4 variant, USART1 has been assigned to `zephyr,console` and `zephyr,shell-uart` since this port was contributed, even though USART1 was always disabled on M4. Signed-off-by: Filip Kokosinski <[email protected]>
1 parent b4893c4 commit 585fb2a

File tree

4 files changed

+8
-14
lines changed

4 files changed

+8
-14
lines changed

boards/arduino/portenta_h7/arduino_portenta_h7_stm32h747xx_m4.dts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,5 @@
2828
};
2929

3030
&usart1 {
31-
status = "disabled";
31+
status = "okay";
3232
};

boards/arduino/portenta_h7/arduino_portenta_h7_stm32h747xx_m4_defconfig

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@ CONFIG_ARM_MPU=y
1010
# Enable HW stack protection
1111
CONFIG_HW_STACK_PROTECTION=y
1212

13-
# Enable uart driver
14-
# CONFIG_SERIAL=y
15-
16-
# By default CONSOLE is assigned to m7
17-
# CONFIG_CONSOLE=y
18-
# CONFIG_UART_CONSOLE=y
13+
# On M4, USART1 is used as the UART console backend by default
14+
CONFIG_SERIAL=y
15+
CONFIG_CONSOLE=y
16+
CONFIG_UART_CONSOLE=y

boards/arduino/portenta_h7/arduino_portenta_h7_stm32h747xx_m7.dts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,9 @@
8080
clock-frequency = <DT_FREQ_M(400)>;
8181
};
8282

83-
83+
/* USART1 is enabled on M4 by default */
8484
&usart1 {
85-
status = "okay";
85+
status = "disabled";
8686
};
8787

8888
&i2c1 {

boards/arduino/portenta_h7/arduino_portenta_h7_stm32h747xx_m7_defconfig

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,8 @@ CONFIG_HW_STACK_PROTECTION=y
1616
# Use zephyr,code-partition as flash offset
1717
CONFIG_USE_DT_CODE_PARTITION=y
1818

19-
# Disable following to assign serial ports to m4 core
20-
21-
# Enable uart driver
19+
# On M7, USB CDC ACM is used as the UART console backend by default
2220
CONFIG_SERIAL=y
23-
24-
# Enable console
2521
CONFIG_CONSOLE=y
2622
CONFIG_UART_CONSOLE=y
2723
CONFIG_UART_LINE_CTRL=y

0 commit comments

Comments
 (0)