mirror of
https://github.com/espressif/esp-idf.git
synced 2026-04-27 19:13:21 +00:00
Merge branch 'fix/change_api_to_enable_rc32k_v5.1' into 'release/v5.1'
fix: change the api to enable rc32k (v5.1) See merge request espressif/esp-idf!42527
This commit is contained in:
@@ -18,6 +18,9 @@
|
||||
#include "esp_sleep.h"
|
||||
#include "hal/efuse_hal.h"
|
||||
#include "hal/clk_tree_ll.h"
|
||||
#if CONFIG_IDF_TARGET_ESP32H2
|
||||
#include "soc/rtc.h"
|
||||
#endif // CONFIG_IDF_TARGET_ESP32H2
|
||||
|
||||
// Please define the frequently called modules in the low bit,
|
||||
// which will improve the execution efficiency
|
||||
@@ -369,7 +372,7 @@ void modem_clock_select_lp_clock_source(periph_module_t module, modem_clock_lpcl
|
||||
if (selected) {
|
||||
rc_clk_en = clk_ll_rc32k_is_enabled();
|
||||
if (!rc_clk_en) {
|
||||
clk_ll_rc32k_enable();
|
||||
rtc_clk_rc32k_enable(true);
|
||||
}
|
||||
modem_clock_hal_select_ble_rtc_timer_lpclk_source(MODEM_CLOCK_instance()->hal, MODEM_CLOCK_LPCLK_SRC_RC32K);
|
||||
}
|
||||
@@ -382,7 +385,7 @@ void modem_clock_select_lp_clock_source(periph_module_t module, modem_clock_lpcl
|
||||
if (!rc_clk_en) {
|
||||
extern void r_esp_ble_rtc_ticks_delay(uint32_t ticks);
|
||||
r_esp_ble_rtc_ticks_delay(2);
|
||||
clk_ll_rc32k_disable();
|
||||
rtc_clk_rc32k_enable(false);
|
||||
}
|
||||
#endif // CONFIG_IDF_TARGET_ESP32H2
|
||||
#if SOC_BLE_USE_WIFI_PWR_CLK_WORKAROUND
|
||||
|
||||
Reference in New Issue
Block a user