Skip to content

Commit

Permalink
Merge branch 'feat/support_default_tx_level_for_esp32h2_esp32c6_esp32…
Browse files Browse the repository at this point in the history
…c2_v5.2' into 'release/v5.2'

Feat/support default tx level for esp32h2 esp32c6 esp32c2 v5.2

See merge request espressif/esp-idf!32194
  • Loading branch information
Isl2017 committed Jul 18, 2024
2 parents 9ff44aa + fde1a10 commit e149e10
Show file tree
Hide file tree
Showing 6 changed files with 171 additions and 4 deletions.
59 changes: 59 additions & 0 deletions components/bt/controller/esp32c2/Kconfig.in
Original file line number Diff line number Diff line change
Expand Up @@ -540,3 +540,62 @@ config BT_LE_ROLE_OBSERVER_ENABLE
default y
help
Enable observer role function.

choice BT_LE_DFT_TX_POWER_LEVEL_DBM
prompt "BLE default Tx power level(dBm)"
default BT_LE_DFT_TX_POWER_LEVEL_P9
help
Specify default Tx power level(dBm).
config BT_LE_DFT_TX_POWER_LEVEL_N24
bool "-24dBm"
config BT_LE_DFT_TX_POWER_LEVEL_N21
bool "-21dBm"
config BT_LE_DFT_TX_POWER_LEVEL_N18
bool "-18dBm"
config BT_LE_DFT_TX_POWER_LEVEL_N15
bool "-15dBm"
config BT_LE_DFT_TX_POWER_LEVEL_N12
bool "-12dBm"
config BT_LE_DFT_TX_POWER_LEVEL_N9
bool "-9dBm"
config BT_LE_DFT_TX_POWER_LEVEL_N6
bool "-6dBm"
config BT_LE_DFT_TX_POWER_LEVEL_N3
bool "-3dBm"
config BT_LE_DFT_TX_POWER_LEVEL_N0
bool "0dBm"
config BT_LE_DFT_TX_POWER_LEVEL_P3
bool "+3dBm"
config BT_LE_DFT_TX_POWER_LEVEL_P6
bool "+6dBm"
config BT_LE_DFT_TX_POWER_LEVEL_P9
bool "+9dBm"
config BT_LE_DFT_TX_POWER_LEVEL_P12
bool "+12dBm"
config BT_LE_DFT_TX_POWER_LEVEL_P15
bool "+15dBm"
config BT_LE_DFT_TX_POWER_LEVEL_P18
bool "+18dBm"
config BT_LE_DFT_TX_POWER_LEVEL_P20
bool "+20dBm"
endchoice

config BT_LE_DFT_TX_POWER_LEVEL_DBM_EFF
int
default -24 if BT_LE_DFT_TX_POWER_LEVEL_N24
default -21 if BT_LE_DFT_TX_POWER_LEVEL_N21
default -18 if BT_LE_DFT_TX_POWER_LEVEL_N18
default -15 if BT_LE_DFT_TX_POWER_LEVEL_N15
default -12 if BT_LE_DFT_TX_POWER_LEVEL_N12
default -9 if BT_LE_DFT_TX_POWER_LEVEL_N9
default -6 if BT_LE_DFT_TX_POWER_LEVEL_N6
default -3 if BT_LE_DFT_TX_POWER_LEVEL_N3
default 0 if BT_LE_DFT_TX_POWER_LEVEL_N0
default 3 if BT_LE_DFT_TX_POWER_LEVEL_P3
default 6 if BT_LE_DFT_TX_POWER_LEVEL_P6
default 9 if BT_LE_DFT_TX_POWER_LEVEL_P9
default 12 if BT_LE_DFT_TX_POWER_LEVEL_P12
default 15 if BT_LE_DFT_TX_POWER_LEVEL_P15
default 18 if BT_LE_DFT_TX_POWER_LEVEL_P18
default 20 if BT_LE_DFT_TX_POWER_LEVEL_P20
default 0
2 changes: 1 addition & 1 deletion components/bt/controller/esp32c2/esp_bt_cfg.h
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ extern "C" {
#define RTC_FREQ_N (32000) /* in Hz */
#endif // CONFIG_XTAL_FREQ_26

#define BLE_LL_TX_PWR_DBM_N (9)
#define BLE_LL_TX_PWR_DBM_N (CONFIG_BT_LE_DFT_TX_POWER_LEVEL_DBM_EFF)


#define RUN_BQB_TEST (0)
Expand Down
50 changes: 50 additions & 0 deletions components/bt/controller/esp32c6/Kconfig.in
Original file line number Diff line number Diff line change
Expand Up @@ -621,3 +621,53 @@ config BT_LE_CCA_RSSI_THRESH
default 20
help
Power threshold of CCA in unit of -1 dBm.

choice BT_LE_DFT_TX_POWER_LEVEL_DBM
prompt "BLE default Tx power level(dBm)"
default BT_LE_DFT_TX_POWER_LEVEL_P9
help
Specify default Tx power level(dBm).
config BT_LE_DFT_TX_POWER_LEVEL_N15
bool "-15dBm"
config BT_LE_DFT_TX_POWER_LEVEL_N12
bool "-12dBm"
config BT_LE_DFT_TX_POWER_LEVEL_N9
bool "-9dBm"
config BT_LE_DFT_TX_POWER_LEVEL_N6
bool "-6dBm"
config BT_LE_DFT_TX_POWER_LEVEL_N3
bool "-3dBm"
config BT_LE_DFT_TX_POWER_LEVEL_N0
bool "0dBm"
config BT_LE_DFT_TX_POWER_LEVEL_P3
bool "+3dBm"
config BT_LE_DFT_TX_POWER_LEVEL_P6
bool "+6dBm"
config BT_LE_DFT_TX_POWER_LEVEL_P9
bool "+9dBm"
config BT_LE_DFT_TX_POWER_LEVEL_P12
bool "+12dBm"
config BT_LE_DFT_TX_POWER_LEVEL_P15
bool "+15dBm"
config BT_LE_DFT_TX_POWER_LEVEL_P18
bool "+18dBm"
config BT_LE_DFT_TX_POWER_LEVEL_P20
bool "+20dBm"
endchoice

config BT_LE_DFT_TX_POWER_LEVEL_DBM_EFF
int
default -15 if BT_LE_DFT_TX_POWER_LEVEL_N15
default -12 if BT_LE_DFT_TX_POWER_LEVEL_N12
default -9 if BT_LE_DFT_TX_POWER_LEVEL_N9
default -6 if BT_LE_DFT_TX_POWER_LEVEL_N6
default -3 if BT_LE_DFT_TX_POWER_LEVEL_N3
default 0 if BT_LE_DFT_TX_POWER_LEVEL_N0
default 3 if BT_LE_DFT_TX_POWER_LEVEL_P3
default 6 if BT_LE_DFT_TX_POWER_LEVEL_P6
default 9 if BT_LE_DFT_TX_POWER_LEVEL_P9
default 12 if BT_LE_DFT_TX_POWER_LEVEL_P12
default 15 if BT_LE_DFT_TX_POWER_LEVEL_P15
default 18 if BT_LE_DFT_TX_POWER_LEVEL_P18
default 20 if BT_LE_DFT_TX_POWER_LEVEL_P20
default 0
2 changes: 1 addition & 1 deletion components/bt/controller/esp32c6/esp_bt_cfg.h
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ extern "C" {

#define RTC_FREQ_N (32768) /* in Hz */

#define BLE_LL_TX_PWR_DBM_N (9)
#define BLE_LL_TX_PWR_DBM_N (CONFIG_BT_LE_DFT_TX_POWER_LEVEL_DBM_EFF)


#define RUN_BQB_TEST (0)
Expand Down
59 changes: 59 additions & 0 deletions components/bt/controller/esp32h2/Kconfig.in
Original file line number Diff line number Diff line change
Expand Up @@ -613,3 +613,62 @@ config BT_LE_CCA_RSSI_THRESH
default 20
help
Power threshold of CCA in unit of -1 dBm.

choice BT_LE_DFT_TX_POWER_LEVEL_DBM
prompt "BLE default Tx power level(dBm)"
default BT_LE_DFT_TX_POWER_LEVEL_P9
help
Specify default Tx power level(dBm).
config BT_LE_DFT_TX_POWER_LEVEL_N24
bool "-24dBm"
config BT_LE_DFT_TX_POWER_LEVEL_N21
bool "-21dBm"
config BT_LE_DFT_TX_POWER_LEVEL_N18
bool "-18dBm"
config BT_LE_DFT_TX_POWER_LEVEL_N15
bool "-15dBm"
config BT_LE_DFT_TX_POWER_LEVEL_N12
bool "-12dBm"
config BT_LE_DFT_TX_POWER_LEVEL_N9
bool "-9dBm"
config BT_LE_DFT_TX_POWER_LEVEL_N6
bool "-6dBm"
config BT_LE_DFT_TX_POWER_LEVEL_N3
bool "-3dBm"
config BT_LE_DFT_TX_POWER_LEVEL_N0
bool "0dBm"
config BT_LE_DFT_TX_POWER_LEVEL_P3
bool "+3dBm"
config BT_LE_DFT_TX_POWER_LEVEL_P6
bool "+6dBm"
config BT_LE_DFT_TX_POWER_LEVEL_P9
bool "+9dBm"
config BT_LE_DFT_TX_POWER_LEVEL_P12
bool "+12dBm"
config BT_LE_DFT_TX_POWER_LEVEL_P15
bool "+15dBm"
config BT_LE_DFT_TX_POWER_LEVEL_P18
bool "+18dBm"
config BT_LE_DFT_TX_POWER_LEVEL_P20
bool "+20dBm"
endchoice

config BT_LE_DFT_TX_POWER_LEVEL_DBM_EFF
int
default -24 if BT_LE_DFT_TX_POWER_LEVEL_N24
default -21 if BT_LE_DFT_TX_POWER_LEVEL_N21
default -18 if BT_LE_DFT_TX_POWER_LEVEL_N18
default -15 if BT_LE_DFT_TX_POWER_LEVEL_N15
default -12 if BT_LE_DFT_TX_POWER_LEVEL_N12
default -9 if BT_LE_DFT_TX_POWER_LEVEL_N9
default -6 if BT_LE_DFT_TX_POWER_LEVEL_N6
default -3 if BT_LE_DFT_TX_POWER_LEVEL_N3
default 0 if BT_LE_DFT_TX_POWER_LEVEL_N0
default 3 if BT_LE_DFT_TX_POWER_LEVEL_P3
default 6 if BT_LE_DFT_TX_POWER_LEVEL_P6
default 9 if BT_LE_DFT_TX_POWER_LEVEL_P9
default 12 if BT_LE_DFT_TX_POWER_LEVEL_P12
default 15 if BT_LE_DFT_TX_POWER_LEVEL_P15
default 18 if BT_LE_DFT_TX_POWER_LEVEL_P18
default 20 if BT_LE_DFT_TX_POWER_LEVEL_P20
default 0
3 changes: 1 addition & 2 deletions components/bt/controller/esp32h2/esp_bt_cfg.h
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,7 @@ extern "C" {

#define RTC_FREQ_N (32768) /* in Hz */

#define BLE_LL_TX_PWR_DBM_N (9)

#define BLE_LL_TX_PWR_DBM_N (CONFIG_BT_LE_DFT_TX_POWER_LEVEL_DBM_EFF)

#define RUN_BQB_TEST (0)
#define RUN_QA_TEST (0)
Expand Down

0 comments on commit e149e10

Please sign in to comment.