Skip to content

Commit c842477

Browse files
committed
Merge branch 'bugfix/fix_bci_443_v5.2' into 'release/v5.2'
fix(bt/controller): Fixed the timeout of wake up timer when using RC OSC (v5.2) See merge request espressif/esp-idf!33892
2 parents 6a56adc + 4219bb9 commit c842477

File tree

1 file changed

+3
-2
lines changed
  • components/bt/controller/esp32c3

1 file changed

+3
-2
lines changed

components/bt/controller/esp32c3/bt.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -777,7 +777,8 @@ static void btdm_sleep_enter_phase1_wrapper(uint32_t lpcycles)
777777
// allow a maximum time uncertainty to be about 488ppm(1/2048) at least as clock drift
778778
// and set the timer in advance
779779
uint32_t uncertainty = (us_to_sleep >> 11);
780-
#if CONFIG_FREERTOS_USE_TICKLESS_IDLE
780+
#if CONFIG_BT_CTRL_MAIN_XTAL_PU_DURING_LIGHT_SLEEP
781+
// recalculate clock drift when Bluetooth using main XTAL during light sleep
781782
if (rtc_clk_slow_src_get() == SOC_RTC_SLOW_CLK_SRC_RC_SLOW) {
782783
uncertainty = us_to_sleep * BTDM_RTC_SLOW_CLK_RC_DRIFT_PERCENT / 100;
783784
}
@@ -1752,7 +1753,7 @@ esp_power_level_t esp_ble_tx_power_get(esp_ble_power_type_t power_type)
17521753
handle = power_type;
17531754
}
17541755

1755-
lvl = (esp_power_level_t)ble_txpwr_get(power_type, handle);
1756+
lvl = (esp_power_level_t)ble_txpwr_get(enh_pwr_type, handle);
17561757

17571758
return lvl;
17581759
}

0 commit comments

Comments
 (0)