From cb617da906f252cf197cd2401ff31d53d2341e53 Mon Sep 17 00:00:00 2001 From: wuzhenghui Date: Mon, 9 Feb 2026 20:52:49 +0800 Subject: [PATCH] fix(esp_driver_uart): enable pad sleep clock in uart_wakeup_setup function --- components/esp_driver_uart/src/uart_wakeup.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/components/esp_driver_uart/src/uart_wakeup.c b/components/esp_driver_uart/src/uart_wakeup.c index 8412487a1e..c24084fdb2 100644 --- a/components/esp_driver_uart/src/uart_wakeup.c +++ b/components/esp_driver_uart/src/uart_wakeup.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2024-2025 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2024-2026 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -15,6 +15,7 @@ #include "driver/uart_wakeup.h" #include "hal/uart_hal.h" #include "esp_private/esp_sleep_internal.h" +#include "esp_private/uart_share_hw_ctrl.h" #include "esp_log.h" const __attribute__((unused)) static char *TAG = "uart_wakeup"; @@ -72,6 +73,10 @@ esp_err_t uart_wakeup_setup(uart_port_t uart_num, const uart_wakeup_cfg_t *cfg) // This should be mocked at ll level if the selection of the UART wakeup mode is not supported by this SOC. uart_ll_set_wakeup_mode(hw, cfg->wakeup_mode); + HP_UART_PAD_CLK_ATOMIC() { + uart_ll_enable_pad_sleep_clock(hw, true); + } + #if SOC_PM_SUPPORT_PMU_CLK_ICG // When hp uarts are utilized, the main XTAL need to be PU and UARTx & IOMX ICG need to be ungate if (uart_num < SOC_UART_HP_NUM && cfg->wakeup_mode != UART_WK_MODE_ACTIVE_THRESH) {