Skip to content

Commit

Permalink
boards/arduino/portenta_h7: enable USART1 on M4
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
fkokosinski committed Nov 22, 2024
1 parent 65511ea commit cd10bac
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@
};

&usart1 {
status = "disabled";
status = "okay";
};
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ CONFIG_ARM_MPU=y
# Enable HW stack protection
CONFIG_HW_STACK_PROTECTION=y

# Enable uart driver
# CONFIG_SERIAL=y

# By default CONSOLE is assigned to m7
# CONFIG_CONSOLE=y
# CONFIG_UART_CONSOLE=y
# On M4, USART1 is used as the UART console backend by default
CONFIG_SERIAL=y
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@
clock-frequency = <DT_FREQ_M(400)>;
};


/* USART1 is enabled on M4 by default */
&usart1 {
status = "okay";
status = "disabled";
};

&i2c1 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,8 @@ CONFIG_HW_STACK_PROTECTION=y
# Use zephyr,code-partition as flash offset
CONFIG_USE_DT_CODE_PARTITION=y

# Disable following to assign serial ports to m4 core

# Enable uart driver
# On M7, USB CDC ACM is used as the UART console backend by default
CONFIG_SERIAL=y

# Enable console
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y
CONFIG_UART_LINE_CTRL=y
Expand Down

0 comments on commit cd10bac

Please sign in to comment.