mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-01 18:50:34 +03:00
fix(wifi): fix external coexistence depends on wifi connect issue
This commit is contained in:
@@ -17,9 +17,7 @@
|
||||
#include "esp_private/gpio.h"
|
||||
#endif
|
||||
|
||||
#if SOC_MODEM_CLOCK_IS_INDEPENDENT
|
||||
#include "esp_private/esp_modem_clock.h"
|
||||
#endif
|
||||
#include "esp_private/periph_ctrl.h"
|
||||
|
||||
#if CONFIG_ESP_COEX_SW_COEXIST_ENABLE && CONFIG_SOC_IEEE802154_SUPPORTED
|
||||
#include "esp_coex_i154.h"
|
||||
@@ -267,16 +265,11 @@ esp_err_t esp_enable_extern_coex_gpio_pin(external_coex_wire_t wire_type, esp_ex
|
||||
return ESP_ERR_INVALID_ARG;
|
||||
#endif /* SOC_EXTERNAL_COEX_ADVANCE */
|
||||
}
|
||||
#if SOC_MODEM_CLOCK_IS_INDEPENDENT
|
||||
modem_clock_module_enable(PERIPH_COEX_MODULE);
|
||||
#endif
|
||||
coex_module_enable();
|
||||
#if SOC_EXTERNAL_COEX_ADVANCE
|
||||
esp_coex_external_params(g_external_coex_params, 0, 0);
|
||||
#endif
|
||||
esp_err_t ret = esp_coex_external_set(EXTERN_COEX_PTI_MID, EXTERN_COEX_PTI_MID, EXTERN_COEX_PTI_HIGH);
|
||||
#if SOC_MODEM_CLOCK_IS_INDEPENDENT
|
||||
modem_clock_module_disable(PERIPH_COEX_MODULE);
|
||||
#endif
|
||||
if (ESP_OK != ret) {
|
||||
return ESP_FAIL;
|
||||
}
|
||||
@@ -286,7 +279,7 @@ esp_err_t esp_enable_extern_coex_gpio_pin(external_coex_wire_t wire_type, esp_ex
|
||||
esp_err_t esp_disable_extern_coex_gpio_pin(void)
|
||||
{
|
||||
esp_coex_external_stop();
|
||||
|
||||
coex_module_disable();
|
||||
return ESP_OK;
|
||||
}
|
||||
#endif /* External Coex */
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2018-2024 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2018-2025 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -19,9 +19,7 @@
|
||||
#include "soc/gpio_sig_map.h"
|
||||
#include "esp_rom_gpio.h"
|
||||
#include "soc/soc.h"
|
||||
#if SOC_MODEM_CLOCK_IS_INDEPENDENT
|
||||
#include "esp_private/esp_modem_clock.h"
|
||||
#endif
|
||||
#include "esp_private/periph_ctrl.h"
|
||||
|
||||
#if CONFIG_ESP_COEX_GPIO_DEBUG
|
||||
static char* TAG = "coexist debug";
|
||||
@@ -192,13 +190,9 @@ esp_err_t esp_coexist_debug_matrix_init(int evt, int sig, bool rev)
|
||||
|
||||
esp_err_t esp_coexist_gpio_debug_matrix_config(int event)
|
||||
{
|
||||
#if SOC_MODEM_CLOCK_IS_INDEPENDENT
|
||||
modem_clock_module_enable(PERIPH_COEX_MODULE);
|
||||
#endif
|
||||
coex_module_enable();
|
||||
esp_err_t ret = coex_gpio_debug_matrix_config(event);
|
||||
#if SOC_MODEM_CLOCK_IS_INDEPENDENT
|
||||
modem_clock_module_disable(PERIPH_COEX_MODULE);
|
||||
#endif
|
||||
coex_module_disable();
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -265,14 +259,10 @@ esp_err_t esp_coexist_debug_init(void)
|
||||
gpio_set_level(s_io_nums[i], false);
|
||||
}
|
||||
|
||||
#if SOC_MODEM_CLOCK_IS_INDEPENDENT
|
||||
modem_clock_module_enable(PERIPH_COEX_MODULE);
|
||||
#endif
|
||||
coex_module_enable();
|
||||
/* Init coexist hardware signal */
|
||||
ESP_ERROR_CHECK(coex_gpio_debug_matrix_init());
|
||||
#if SOC_MODEM_CLOCK_IS_INDEPENDENT
|
||||
modem_clock_module_disable(PERIPH_COEX_MODULE);
|
||||
#endif
|
||||
coex_module_disable();
|
||||
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user