mirror of
https://github.com/espressif/esp-idf.git
synced 2026-04-27 19:13:21 +00:00
feat(ble): support adv fast tx feature on ESP32-C6 and ESP32-H2
This commit is contained in:
@@ -1000,3 +1000,12 @@ config BT_LE_CTRL_DL_ITVL_PHY_SYNC_EN
|
||||
When this option is enabled, the Controller automatically initiates a data length update
|
||||
Using the appropriate data length parameters
|
||||
When a PHY update or a connection interval update occurs.
|
||||
|
||||
config BT_LE_CTRL_ADV_FAST_TX_EN
|
||||
bool "Reduce adv enable-to-air latency (READ DOCS FIRST) (EXPERIMENTAL)"
|
||||
default n
|
||||
help
|
||||
Reduce the latency between issuing the advertising enable command
|
||||
and the actual on-air transmission by executing the advertising TX
|
||||
path from IRAM.
|
||||
Note: Enabling this option increases IRAM usage.
|
||||
|
||||
@@ -80,6 +80,13 @@ int pawrSync_stack_enable(void);
|
||||
void pawrSync_stack_disable(void);
|
||||
#endif // DEFAULT_BT_LE_PAWR_SUPPORTED
|
||||
|
||||
#if CONFIG_BT_LE_CTRL_ADV_FAST_TX_EN
|
||||
int advFastTx_stack_initEnv(void);
|
||||
void advFastTx_stack_deinitEnv(void);
|
||||
int advFastTx_stack_enable(void);
|
||||
void advFastTx_stack_disable(void);
|
||||
#endif // CONFIG_BT_LE_CTRL_ADV_FAST_TX_EN
|
||||
|
||||
#if (CONFIG_BT_NIMBLE_ENABLED || CONFIG_BT_BLUEDROID_ENABLED)
|
||||
void adv_stack_enableClearLegacyAdvVsCmd(bool en);
|
||||
void scan_stack_enableAdvFlowCtrlVsCmd(bool en);
|
||||
@@ -211,12 +218,20 @@ int ble_stack_initEnv(void)
|
||||
return rc;
|
||||
}
|
||||
#endif // DEFAULT_BT_LE_PAWR_SUPPORTED
|
||||
|
||||
#if CONFIG_BT_LE_CTRL_ADV_FAST_TX_EN
|
||||
rc = advFastTx_stack_initEnv();
|
||||
if (rc) {
|
||||
return rc;
|
||||
}
|
||||
#endif // CONFIG_BT_LE_CTRL_ADV_FAST_TX_EN
|
||||
return 0;
|
||||
}
|
||||
|
||||
void ble_stack_deinitEnv(void)
|
||||
{
|
||||
#if CONFIG_BT_LE_CTRL_ADV_FAST_TX_EN
|
||||
advFastTx_stack_deinitEnv();
|
||||
#endif // CONFIG_BT_LE_CTRL_ADV_FAST_TX_EN
|
||||
#if DEFAULT_BT_LE_PAWR_SUPPORTED
|
||||
pawrSync_stack_deinitEnv();
|
||||
pawrBcast_stack_deinitEnv();
|
||||
@@ -302,7 +317,12 @@ int ble_stack_enable(void)
|
||||
return rc;
|
||||
}
|
||||
#endif // DEFAULT_BT_LE_PAWR_SUPPORTED
|
||||
|
||||
#if CONFIG_BT_LE_CTRL_ADV_FAST_TX_EN
|
||||
rc = advFastTx_stack_enable();
|
||||
if (rc) {
|
||||
return rc;
|
||||
}
|
||||
#endif // CONFIG_BT_LE_CTRL_ADV_FAST_TX_EN
|
||||
#if (CONFIG_BT_NIMBLE_ENABLED || CONFIG_BT_BLUEDROID_ENABLED)
|
||||
ble_stack_enableVsCmds(true);
|
||||
ble_stack_enableVsEvents(true);
|
||||
@@ -321,6 +341,9 @@ void ble_stack_disable(void)
|
||||
ble_stack_enableVsEvents(false);
|
||||
ble_stack_enableVsCmds(false);
|
||||
#endif // (CONFIG_BT_NIMBLE_ENABLED || CONFIG_BT_BLUEDROID_ENABLED)
|
||||
#if CONFIG_BT_LE_CTRL_ADV_FAST_TX_EN
|
||||
advFastTx_stack_disable();
|
||||
#endif // CONFIG_BT_LE_CTRL_ADV_FAST_TX_EN
|
||||
#if DEFAULT_BT_LE_PAWR_SUPPORTED
|
||||
pawrSync_stack_disable();
|
||||
pawrBcast_stack_disable();
|
||||
|
||||
@@ -1004,3 +1004,12 @@ config BT_LE_CTRL_DL_ITVL_PHY_SYNC_EN
|
||||
When this option is enabled, the Controller automatically initiates a data length update
|
||||
Using the appropriate data length parameters
|
||||
When a PHY update or a connection interval update occurs.
|
||||
|
||||
config BT_LE_CTRL_ADV_FAST_TX_EN
|
||||
bool "Reduce adv enable-to-air latency (READ DOCS FIRST) (EXPERIMENTAL)"
|
||||
default n
|
||||
help
|
||||
Reduce the latency between issuing the advertising enable command
|
||||
and the actual on-air transmission by executing the advertising TX
|
||||
path from IRAM.
|
||||
Note: Enabling this option increases IRAM usage.
|
||||
|
||||
@@ -75,6 +75,13 @@ int conn_errorSim_enable(void);
|
||||
void conn_errorSim_disable(void);
|
||||
#endif // CONFIG_BT_LE_ERROR_SIM_ENABLED
|
||||
|
||||
#if CONFIG_BT_LE_CTRL_ADV_FAST_TX_EN
|
||||
int advFastTx_stack_initEnv(void);
|
||||
void advFastTx_stack_deinitEnv(void);
|
||||
int advFastTx_stack_enable(void);
|
||||
void advFastTx_stack_disable(void);
|
||||
#endif // CONFIG_BT_LE_CTRL_ADV_FAST_TX_EN
|
||||
|
||||
#if (CONFIG_BT_NIMBLE_ENABLED || CONFIG_BT_BLUEDROID_ENABLED)
|
||||
void adv_stack_enableClearLegacyAdvVsCmd(bool en);
|
||||
void scan_stack_enableAdvFlowCtrlVsCmd(bool en);
|
||||
@@ -198,12 +205,20 @@ int ble_stack_initEnv(void)
|
||||
return rc;
|
||||
}
|
||||
#endif // DEFAULT_BT_LE_PAWR_SUPPORTED
|
||||
|
||||
#if CONFIG_BT_LE_CTRL_ADV_FAST_TX_EN
|
||||
rc = advFastTx_stack_initEnv();
|
||||
if (rc) {
|
||||
return rc;
|
||||
}
|
||||
#endif // CONFIG_BT_LE_CTRL_ADV_FAST_TX_EN
|
||||
return 0;
|
||||
}
|
||||
|
||||
void ble_stack_deinitEnv(void)
|
||||
{
|
||||
#if CONFIG_BT_LE_CTRL_ADV_FAST_TX_EN
|
||||
advFastTx_stack_deinitEnv();
|
||||
#endif // CONFIG_BT_LE_CTRL_ADV_FAST_TX_EN
|
||||
#if DEFAULT_BT_LE_PAWR_SUPPORTED
|
||||
pawrSync_stack_deinitEnv();
|
||||
pawrBcast_stack_deinitEnv();
|
||||
@@ -289,7 +304,12 @@ int ble_stack_enable(void)
|
||||
return rc;
|
||||
}
|
||||
#endif // DEFAULT_BT_LE_PAWR_SUPPORTED
|
||||
|
||||
#if CONFIG_BT_LE_CTRL_ADV_FAST_TX_EN
|
||||
rc = advFastTx_stack_enable();
|
||||
if (rc) {
|
||||
return rc;
|
||||
}
|
||||
#endif // CONFIG_BT_LE_CTRL_ADV_FAST_TX_EN
|
||||
#if (CONFIG_BT_NIMBLE_ENABLED || CONFIG_BT_BLUEDROID_ENABLED)
|
||||
ble_stack_enableVsCmds(true);
|
||||
ble_stack_enableVsEvents(true);
|
||||
@@ -308,6 +328,9 @@ void ble_stack_disable(void)
|
||||
ble_stack_enableVsEvents(false);
|
||||
ble_stack_enableVsCmds(false);
|
||||
#endif // (CONFIG_BT_NIMBLE_ENABLED || CONFIG_BT_BLUEDROID_ENABLED)
|
||||
#if CONFIG_BT_LE_CTRL_ADV_FAST_TX_EN
|
||||
advFastTx_stack_disable();
|
||||
#endif // CONFIG_BT_LE_CTRL_ADV_FAST_TX_EN
|
||||
#if DEFAULT_BT_LE_PAWR_SUPPORTED
|
||||
pawrSync_stack_disable();
|
||||
pawrBcast_stack_disable();
|
||||
|
||||
@@ -6,17 +6,27 @@ entries:
|
||||
entries:
|
||||
.high_perf_code_iram1+
|
||||
|
||||
[sections:adv_fast_execute_code_iram_text]
|
||||
entries:
|
||||
.adv_fast_execute_code_iram1+
|
||||
|
||||
[scheme:bt_default]
|
||||
entries:
|
||||
bt_bss -> dram0_bss
|
||||
bt_common -> dram0_bss
|
||||
data -> dram0_data
|
||||
high_perf_iram_text -> iram0_text
|
||||
|
||||
if BT_CTRL_RUN_IN_FLASH_ONLY = y:
|
||||
bt_iram_text -> flash_text
|
||||
else:
|
||||
bt_iram_text -> iram0_text
|
||||
|
||||
if BT_LE_CTRL_ADV_FAST_TX_EN = y:
|
||||
adv_fast_execute_code_iram_text -> iram0_text
|
||||
else:
|
||||
adv_fast_execute_code_iram_text -> flash_text
|
||||
|
||||
# For the following fragments, order matters for
|
||||
# 'ALIGN(4) ALIGN(4, post) SURROUND(sym)', which generates:
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user