From 62aade0671e440472e4dc39a0684a5a4a4de7ef1 Mon Sep 17 00:00:00 2001 From: ninh Date: Mon, 26 Oct 2020 16:07:37 +0800 Subject: [PATCH] set clk_gate_en when enable rtc gpio wake up --- components/soc/src/esp32s2/include/hal/rtc_io_ll.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/soc/src/esp32s2/include/hal/rtc_io_ll.h b/components/soc/src/esp32s2/include/hal/rtc_io_ll.h index bce105496b..3a6d37cd81 100644 --- a/components/soc/src/esp32s2/include/hal/rtc_io_ll.h +++ b/components/soc/src/esp32s2/include/hal/rtc_io_ll.h @@ -275,6 +275,7 @@ static inline void rtcio_ll_force_unhold_all(void) */ static inline void rtcio_ll_wakeup_enable(int rtcio_num, rtcio_ll_wake_type_t type) { + SENS.sar_io_mux_conf.iomux_clk_gate_en = 1; RTCIO.pin[rtcio_num].wakeup_enable = 0x1; RTCIO.pin[rtcio_num].int_type = type; } @@ -286,6 +287,7 @@ static inline void rtcio_ll_wakeup_enable(int rtcio_num, rtcio_ll_wake_type_t ty */ static inline void rtcio_ll_wakeup_disable(int rtcio_num) { + SENS.sar_io_mux_conf.iomux_clk_gate_en = 0; RTCIO.pin[rtcio_num].wakeup_enable = 0; RTCIO.pin[rtcio_num].int_type = RTCIO_WAKEUP_DISABLE; }