From 9c1bd7f24e446b7ecca1fa630e10eb646fb82af9 Mon Sep 17 00:00:00 2001 From: Jin Chen Date: Wed, 7 May 2025 10:18:28 +0800 Subject: [PATCH] fix(ble): fix rtc freq set too high on ESP32-C2 (cherry picked from commit 6a80deac038968fc83f8dcb673c1caceefa783fc) Co-authored-by: cjin --- components/bt/controller/esp32c2/bt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/bt/controller/esp32c2/bt.c b/components/bt/controller/esp32c2/bt.c index 3b28a36ea6..7bffc4f9ae 100644 --- a/components/bt/controller/esp32c2/bt.c +++ b/components/bt/controller/esp32c2/bt.c @@ -472,11 +472,12 @@ static DRAM_ATTR esp_pm_lock_handle_t s_pm_lock = NULL; #endif // CONFIG_PM_ENABLE #ifdef CONFIG_XTAL_FREQ_26 #define MAIN_XTAL_FREQ_HZ (26000000) +static DRAM_ATTR uint32_t s_bt_lpclk_freq = 40000; #else #define MAIN_XTAL_FREQ_HZ (40000000) +static DRAM_ATTR uint32_t s_bt_lpclk_freq = 32000; #endif static DRAM_ATTR modem_clock_lpclk_src_t s_bt_lpclk_src = MODEM_CLOCK_LPCLK_SRC_INVALID; -static DRAM_ATTR uint32_t s_bt_lpclk_freq = 100000; #define BLE_RTC_DELAY_US (1800)