This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new b3567fe964 xtensa/esp32s2: enable sysclk and deassert reset signal for
uart1
b3567fe964 is described below
commit b3567fe964777951d9cf6faf94977467a871068a
Author: chenxiaoyi <[email protected]>
AuthorDate: Tue Apr 8 20:07:49 2025 +0800
xtensa/esp32s2: enable sysclk and deassert reset signal for uart1
The uart1 is found be in reset state, and the sysclk is not enabled
for it.
Signed-off-by: chenxiaoyi <[email protected]>
---
arch/xtensa/src/esp32s2/esp32s2_lowputc.c | 1 +
arch/xtensa/src/esp32s2/esp32s2_serial.c | 2 ++
2 files changed, 3 insertions(+)
diff --git a/arch/xtensa/src/esp32s2/esp32s2_lowputc.c
b/arch/xtensa/src/esp32s2/esp32s2_lowputc.c
index 669f409e5e..89f88f34ed 100644
--- a/arch/xtensa/src/esp32s2/esp32s2_lowputc.c
+++ b/arch/xtensa/src/esp32s2/esp32s2_lowputc.c
@@ -817,6 +817,7 @@ void esp32s2_lowsetup(void)
#ifdef CONFIG_ESP32S2_UART1
+ esp32s2_lowputc_rst_peripheral(&g_uart1_config);
esp32s2_lowputc_config_pins(&g_uart1_config);
#endif
diff --git a/arch/xtensa/src/esp32s2/esp32s2_serial.c
b/arch/xtensa/src/esp32s2/esp32s2_serial.c
index a026de48ac..c1b72790f0 100644
--- a/arch/xtensa/src/esp32s2/esp32s2_serial.c
+++ b/arch/xtensa/src/esp32s2/esp32s2_serial.c
@@ -301,6 +301,8 @@ static int esp32s2_setup(struct uart_dev_s *dev)
/* Initialize UART module */
+ esp32s2_lowputc_enable_sysclk(priv);
+
/* Discard corrupt RX data */
modifyreg32(UART_CONF0_REG(priv->id), 0, UART_ERR_WR_MASK_M);