fix(esp_hw_support): fix current leakage if ext32k slow clock source not exists

This commit is contained in:
wuzhenghui
2025-03-31 14:58:00 +08:00
parent 6b4f08c1dc
commit c84757d35e
33 changed files with 216 additions and 48 deletions

View File

@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -172,6 +172,11 @@ void rtc_clk_32k_enable(bool en);
*/
void rtc_clk_32k_enable_external(void);
/**
* @brief Disable 32 kHz XTAL oscillator input.
*/
void rtc_clk_32k_disable_external(void);
/**
* @brief Get the state of 32k XTAL oscillator
* @return true if 32k XTAL oscillator has been enabled

View File

@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -115,6 +115,11 @@ void rtc_clk_32k_enable_external(void)
rtc_clk_32k_enable_common(CLK_LL_XTAL32K_ENABLE_MODE_EXTERNAL);
}
void rtc_clk_32k_disable_external(void)
{
clk_ll_xtal32k_disable();
}
/* Helping external 32kHz crystal to start up.
* External crystal connected to outputs GPIO32 GPIO33.
* Forms N pulses with a frequency of about 32KHz on the outputs of the crystal.