Skip to content

Commit bd3b731

Browse files
Raffael Rostagnonashif
Raffael Rostagno
authored andcommitted
soc: esp32c2: esp8684: Console baudrate from device tree
Get console baudrate property from device tree to allow proper configuration for 26 and 40 Mhz devices. Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
1 parent 9d345fc commit bd3b731

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

soc/espressif/esp32c2/CMakeLists.txt

+5-1
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,13 @@ dt_reg_addr(img_0_off PATH ${dts_partition_path})
4545
dt_nodelabel(dts_partition_path NODELABEL "boot_partition")
4646
dt_reg_addr(boot_off PATH ${dts_partition_path})
4747

48+
# get UART baudrate from DT
49+
dt_chosen(dts_shell_uart PROPERTY "zephyr,shell-uart")
50+
dt_prop(monitor_baud PATH ${dts_shell_uart} PROPERTY "current-speed")
51+
4852
# C2 uses specific values for flash frequency and UART baudrate
4953
board_runner_args(esp32 "--esp-flash-freq=60m")
50-
board_runner_args(esp32 "--esp-monitor-baud=74880")
54+
board_runner_args(esp32 "--esp-monitor-baud=${monitor_baud}")
5155

5256
if(CONFIG_ESP_SIMPLE_BOOT)
5357
board_finalize_runner_args(esp32 "--esp-app-address=${boot_off}")

0 commit comments

Comments
 (0)