Merge branch 'ble_dev/esp32c6_support_power_save_example' into 'master'

ble: support esp32c6 power save example

Closes EBLE50Y23-148

See merge request espressif/esp-idf!24385
This commit is contained in:
Island
2023-06-30 14:36:26 +08:00
5 changed files with 98 additions and 17 deletions

View File

@@ -620,7 +620,6 @@ void controller_sleep_deinit(void)
esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg)
{
uint8_t mac[6];
uint32_t chip_version;
esp_err_t ret = ESP_OK;
ble_npl_count_info_t npl_info;
@@ -681,9 +680,9 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg)
#endif // CONFIG_BT_NIMBLE_ENABLED
/* Enable BT-related clocks */
modem_clock_module_enable(PERIPH_BT_MODULE);
chip_version = efuse_hal_chip_revision();
/* Select slow clock source for BT momdule */
#if CONFIG_BT_LE_LP_CLK_SRC_MAIN_XTAL
uint32_t chip_version = efuse_hal_chip_revision();
ESP_LOGI(NIMBLE_PORT_LOG_TAG, "Using main XTAL as clock source");
if (chip_version == 0) {
modem_clock_select_lp_clock_source(PERIPH_BT_MODULE, MODEM_CLOCK_LPCLK_SRC_MAIN_XTAL, (400 - 1));