Merge branch 'bugfix/fix_ble_coded_phy_rx_bug_v5.3' into 'release/v5.3'

fix(coex): fix ble coded phy rx issue when aborted by coex (v5.3)

See merge request espressif/esp-idf!48985
This commit is contained in:
Jiang Jiang Jian
2026-05-29 10:30:58 +08:00
4 changed files with 48 additions and 6 deletions

View File

@@ -987,7 +987,14 @@ typedef struct {
int8_t tx_power; /*!< ext adv tx power */
esp_ble_gap_pri_phy_t primary_phy; /*!< ext adv primary phy */
uint8_t max_skip; /*!< ext adv maximum skip */
esp_ble_gap_phy_t secondary_phy; /*!< ext adv secondary phy */
esp_ble_gap_phy_t secondary_phy; /*!< ext adv secondary phy.
Note: If the advertiser sends connectable advertising packets on the LE Coded
PHY, the peer may then establish the ACL connection on the LE Coded PHY, which
will significantly degrade Wi-Fi performance in Bluetooth/Wi-Fi coexistence
scenarios because Coded PHY (S=2/S=8) packets occupy the radio for much longer
than 1M/2M PHY packets. It is recommended to use the LE 2M PHY (or LE 1M PHY)
first, and only use the LE Coded PHY when the long-range capability is really
required. */
uint8_t sid; /*!< ext adv sid */
bool scan_req_notif; /*!< ext adv scan request event notify */
#if (CONFIG_BT_BLE_FEAT_ADV_CODING_SELECTION)
@@ -3632,6 +3639,12 @@ esp_err_t esp_ble_gap_read_phy(esp_bd_addr_t bd_addr);
* @param[in] tx_phy_mask : indicates the transmitter PHYs that the Host prefers the Controller to use
* @param[in] rx_phy_mask : indicates the receiver PHYs that the Host prefers the Controller to use
*
* @note Including the LE Coded PHY in tx_phy_mask / rx_phy_mask may cause subsequent ACL connections to run on
* the LE Coded PHY, which will significantly degrade Wi-Fi performance in Bluetooth/Wi-Fi coexistence
* scenarios because Coded PHY (S=2/S=8) packets occupy the radio for much longer than 1M/2M PHY packets.
* It is recommended to use the LE 2M PHY (or LE 1M PHY) first, and only include the LE Coded PHY when the
* long-range capability is really required.
*
* @return - ESP_OK : success
* - other : failed
*
@@ -3648,6 +3661,11 @@ esp_err_t esp_ble_gap_set_preferred_default_phy(esp_ble_gap_phy_mask_t tx_phy_ma
* @param[in] rx_phy_mask : a bit field that indicates the receiver PHYs that the Host prefers the Controller to use
* @param[in] phy_options : a bit field that allows the Host to specify options for PHYs
*
* @note Switching an existing ACL connection to the LE Coded PHY via tx_phy_mask / rx_phy_mask will significantly
* degrade Wi-Fi performance in Bluetooth/Wi-Fi coexistence scenarios, because Coded PHY (S=2/S=8) packets
* occupy the radio for much longer than 1M/2M PHY packets. It is recommended to use the LE 2M PHY (or LE 1M
* PHY) first, and only switch to the LE Coded PHY when the long-range capability is really required.
*
* @return - ESP_OK : success
* - other : failed
*
@@ -3960,6 +3978,12 @@ esp_err_t esp_ble_gap_get_periodic_list_size(uint8_t *size);
* @param[in] phy_2m_conn_params : Connection parameters for the LE 2M PHY are provided.
* @param[in] phy_coded_conn_params : Scan connectable advertisements on the LE Coded PHY. Connection parameters for the LE Coded PHY are provided.
*
* @note Using the LE Coded PHY for the ACL connection will significantly degrade Wi-Fi performance, because
* the on-air transmission time of a Coded PHY packet (S=2 or S=8) is much longer than that of a 1M/2M PHY
* packet, so the Bluetooth controller occupies the radio for a longer time and leaves less airtime for Wi-Fi.
* In Bluetooth/Wi-Fi coexistence scenarios, it is recommended to use the LE 2M PHY or LE 1M PHY first, and
* only fall back to the LE Coded PHY when the long-range capability is really required.
*
* @return - ESP_OK : success
* - other : failed
*

View File

@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2015-2026 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -692,7 +692,16 @@ typedef struct {
esp_ble_phy_mask_t phy_mask; /*!< Indicates which PHY connection parameters will be used. When is_aux is false, only the connection params for 1M PHY can be specified */
const esp_ble_conn_params_t *phy_1m_conn_params; /*!< Connection parameters for the LE 1M PHY */
const esp_ble_conn_params_t *phy_2m_conn_params; /*!< Connection parameters for the LE 2M PHY */
const esp_ble_conn_params_t *phy_coded_conn_params; /*!< Connection parameters for the LE Coded PHY */
const esp_ble_conn_params_t *phy_coded_conn_params; /*!< Connection parameters for the LE Coded PHY.
Note: Establishing an ACL connection over the LE Coded PHY
will significantly degrade Wi-Fi performance, because the
on-air transmission time of a Coded PHY packet (S=2 or S=8)
is much longer than that of a 1M/2M PHY packet, so the
Bluetooth controller occupies the radio for a longer time
and leaves less airtime for Wi-Fi. In Bluetooth/Wi-Fi
coexistence scenarios, it is recommended to use the LE 2M
PHY or LE 1M PHY first, and only fall back to the LE Coded
PHY when the long-range capability is really required. */
} esp_ble_gatt_creat_conn_params_t;
/** @brief Represents a creat connection element. */
@@ -705,7 +714,16 @@ typedef struct {
esp_ble_phy_mask_t phy_mask; /*!< Indicates which PHY connection parameters will be used. When is_aux is false, only the connection params for 1M PHY can be specified */
const esp_ble_conn_params_t *phy_1m_conn_params; /*!< Connection parameters for the LE 1M PHY */
const esp_ble_conn_params_t *phy_2m_conn_params; /*!< Connection parameters for the LE 2M PHY */
const esp_ble_conn_params_t *phy_coded_conn_params; /*!< Connection parameters for the LE Coded PHY */
const esp_ble_conn_params_t *phy_coded_conn_params; /*!< Connection parameters for the LE Coded PHY.
Note: Establishing an ACL connection over the LE Coded PHY
will significantly degrade Wi-Fi performance, because the
on-air transmission time of a Coded PHY packet (S=2 or S=8)
is much longer than that of a 1M/2M PHY packet, so the
Bluetooth controller occupies the radio for a longer time
and leaves less airtime for Wi-Fi. In Bluetooth/Wi-Fi
coexistence scenarios, it is recommended to use the LE 2M
PHY or LE 1M PHY first, and only fall back to the LE Coded
PHY when the long-range capability is really required. */
} esp_ble_gatt_pawr_conn_params_t;
#ifdef __cplusplus

View File

@@ -21,7 +21,6 @@ r_llc_rem_encrypt_proc_continue_eco = 0x40001cf0;
r_lld_ext_adv_dynamic_aux_pti_process_eco = 0x40001cfc;
r_lld_adv_start_eco = 0x40001d04;
r_lld_con_evt_canceled_cbk_eco = 0x40001d08;
r_lld_con_start_eco = 0x40001d10;
r_lld_ext_scan_dynamic_pti_process_eco = 0x40001d28;
r_lld_scan_frm_eof_isr_eco = 0x40001d2c;
r_lld_sync_start_eco = 0x40001d30;
@@ -127,4 +126,5 @@ r_lld_con_tx_eco = 0x40001d18;
r_lld_con_evt_time_update_eco = 0x40001d0c;
r_lld_con_evt_start_cbk_eco = 0x40001d1c;
r_lld_con_frm_isr_eco = 0x40001d14;
r_lld_con_start_eco = 0x40001d10;
*/