diff options
Diffstat (limited to 'lib/bt/controller/esp32c2/Kconfig.in')
| -rw-r--r-- | lib/bt/controller/esp32c2/Kconfig.in | 372 |
1 files changed, 294 insertions, 78 deletions
diff --git a/lib/bt/controller/esp32c2/Kconfig.in b/lib/bt/controller/esp32c2/Kconfig.in index 9a04ae63..c720fcb8 100644 --- a/lib/bt/controller/esp32c2/Kconfig.in +++ b/lib/bt/controller/esp32c2/Kconfig.in @@ -2,15 +2,15 @@ menu "HCI Config" choice BT_LE_HCI_INTERFACE - prompt "Select HCI interface" + prompt "HCI mode" default BT_LE_HCI_INTERFACE_USE_RAM config BT_LE_HCI_INTERFACE_USE_RAM - bool "ram" + bool "VHCI" help Use RAM as HCI interface config BT_LE_HCI_INTERFACE_USE_UART - bool "uart" + bool "UART(H4)" help Use UART as HCI interface endchoice @@ -73,12 +73,26 @@ menu "HCI Config" UART_PARITY_ODD endchoice - config BT_LE_HCI_UART_TASK_STACK_SIZE - int "HCI uart task stack size" - depends on BT_LE_HCI_INTERFACE_USE_UART - default 1000 + config BT_LE_HCI_UART_RX_BUFFER_SIZE + int "The size of rx ring buffer memory" + depends on !BT_LE_HCI_INTERFACE_USE_RAM + default 512 + help + The size of rx ring buffer memory + + config BT_LE_HCI_UART_TX_BUFFER_SIZE + int "The size of tx ring buffer memory" + depends on !BT_LE_HCI_INTERFACE_USE_RAM + default 256 + help + The size of tx ring buffer memory + + config BT_LE_HCI_TRANS_TASK_STACK_SIZE + int "HCI transport task stack size" + depends on !BT_LE_HCI_INTERFACE_USE_RAM + default 2048 help - Set the size of uart task stack + This configures stack size of hci transport task endmenu config BT_LE_CONTROLLER_NPL_OS_PORTING_SUPPORT @@ -95,85 +109,99 @@ menuconfig BT_LE_50_FEATURE_SUPPORT help Enable BLE 5 feature -config BT_LE_LL_CFG_FEAT_LE_2M_PHY - bool "Enable 2M Phy" - depends on BT_LE_50_FEATURE_SUPPORT - default y - help - Enable 2M-PHY - -config BT_LE_LL_CFG_FEAT_LE_CODED_PHY - bool "Enable coded Phy" - depends on BT_LE_50_FEATURE_SUPPORT - default y - help - Enable coded-PHY - -config BT_LE_EXT_ADV - bool "Enable extended advertising" - depends on BT_LE_50_FEATURE_SUPPORT - default y - help - Enable this option to do extended advertising. Extended advertising - will be supported from BLE 5.0 onwards. - -if BT_LE_EXT_ADV - config BT_LE_MAX_EXT_ADV_INSTANCES - int "Maximum number of extended advertising instances." - range 0 4 - default 1 - depends on BT_LE_EXT_ADV - help - Change this option to set maximum number of extended advertising - instances. Minimum there is always one instance of - advertising. Enter how many more advertising instances you - want. - Each extended advertising instance will take about 0.5k DRAM. - - config BT_LE_EXT_ADV_MAX_SIZE - int "Maximum length of the advertising data." - range 0 1650 - default 1650 - depends on BT_LE_EXT_ADV +if BT_LE_50_FEATURE_SUPPORT + config BT_LE_LL_CFG_FEAT_LE_2M_PHY + bool "Enable 2M Phy" + depends on BT_LE_50_FEATURE_SUPPORT + default y help - Defines the length of the extended adv data. The value should not - exceed 1650. + Enable 2M-PHY - config BT_LE_ENABLE_PERIODIC_ADV - bool "Enable periodic advertisement." + config BT_LE_LL_CFG_FEAT_LE_CODED_PHY + bool "Enable coded Phy" + depends on BT_LE_50_FEATURE_SUPPORT default y - depends on BT_LE_EXT_ADV help - Enable this option to start periodic advertisement. + Enable coded-PHY - config BT_LE_PERIODIC_ADV_SYNC_TRANSFER - bool "Enable Transfer Sync Events" - depends on BT_LE_ENABLE_PERIODIC_ADV + config BT_LE_EXT_ADV + bool "Enable extended advertising" + depends on BT_LE_50_FEATURE_SUPPORT default y help - This enables controller transfer periodic sync events to host + Enable this option to do extended advertising. Extended advertising + will be supported from BLE 5.0 onwards. + + if BT_LE_EXT_ADV + config BT_LE_MAX_EXT_ADV_INSTANCES + int "Maximum number of extended advertising instances." + range 0 4 + default 1 + depends on BT_LE_EXT_ADV + help + Change this option to set maximum number of extended advertising + instances. Minimum there is always one instance of + advertising. Enter how many more advertising instances you + want. + Each extended advertising instance will take about 0.5k DRAM. + + config BT_LE_EXT_ADV_MAX_SIZE + int "Maximum length of the advertising data." + range 0 1650 + default 1650 + depends on BT_LE_EXT_ADV + help + Defines the length of the extended adv data. The value should not + exceed 1650. -endif + config BT_LE_ENABLE_PERIODIC_ADV + bool "Enable periodic advertisement." + default y + depends on BT_LE_EXT_ADV + help + Enable this option to start periodic advertisement. -config BT_LE_MAX_PERIODIC_SYNCS - int "Maximum number of periodic advertising syncs" - depends on BT_LE_50_FEATURE_SUPPORT && !BT_NIMBLE_ENABLED + config BT_LE_PERIODIC_ADV_SYNC_TRANSFER + bool "Enable Transfer Sync Events" + depends on BT_LE_ENABLE_PERIODIC_ADV + default y + help + This enables controller transfer periodic sync events to host + endif - range 0 3 - default 1 if BT_LE_ENABLE_PERIODIC_ADV - default 0 - help - Set this option to set the upper limit for number of periodic sync - connections. This should be less than maximum connections allowed by - controller. + config BT_LE_EXT_SCAN + bool "Enable extended scanning" + depends on BT_LE_50_FEATURE_SUPPORT && BT_LE_ROLE_OBSERVER_ENABLE + default y + help + Enable this option to do extended scanning. -config BT_LE_MAX_PERIODIC_ADVERTISER_LIST - int "Maximum number of periodic advertiser list" - depends on BT_LE_50_FEATURE_SUPPORT && !BT_NIMBLE_ENABLED - range 1 5 - default 5 - help - Set this option to set the upper limit for number of periodic advertiser list. + config BT_LE_ENABLE_PERIODIC_SYNC + bool "Enable periodic sync" + default y + depends on BT_LE_EXT_SCAN + help + Enable this option to receive periodic advertisement. + + if BT_LE_ENABLE_PERIODIC_SYNC + config BT_LE_MAX_PERIODIC_SYNCS + int "Maximum number of periodic advertising syncs" + range 0 3 + default 1 if BT_LE_ENABLE_PERIODIC_ADV + default 0 + help + Set this option to set the upper limit for number of periodic sync + connections. This should be less than maximum connections allowed by + controller. + + config BT_LE_MAX_PERIODIC_ADVERTISER_LIST + int "Maximum number of periodic advertiser list" + range 1 5 + default 5 + help + Set this option to set the upper limit for number of periodic advertiser list. + endif +endif menu "Memory Settings" depends on !BT_NIMBLE_ENABLED @@ -280,6 +308,33 @@ config BT_LE_CONTROLLER_LOG_DUMP_ONLY help Only operate in dump mode +config BT_LE_CONTROLLER_LOG_SPI_OUT_ENABLED + bool "Output ble controller logs to SPI bus (Experimental)" + depends on BT_LE_CONTROLLER_LOG_ENABLED + depends on !BT_LE_CONTROLLER_LOG_DUMP_ONLY + select BT_BLE_LOG_SPI_OUT_ENABLED + default n + help + Output ble controller logs to SPI bus + +config BT_LE_CONTROLLER_LOG_STORAGE_ENABLE + bool "Store ble controller logs to flash(Experimental)" + depends on !BT_LE_CONTROLLER_LOG_DUMP_ONLY + depends on BT_LE_CONTROLLER_LOG_ENABLED + default n + help + Store ble controller logs to flash memory. + +config BT_LE_CONTROLLER_LOG_PARTITION_SIZE + int "size of ble controller log partition(Multiples of 4K)" + depends on BT_LE_CONTROLLER_LOG_STORAGE_ENABLE + default 65536 + help + The size of ble controller log partition shall be a multiples of 4K. + The name of log partition shall be "bt_ctrl_log". + The partition type shall be ESP_PARTITION_TYPE_DATA. + The partition sub_type shall be ESP_PARTITION_SUBTYPE_ANY. + config BT_LE_LOG_CTRL_BUF1_SIZE int "size of the first BLE controller LOG buffer" depends on BT_LE_CONTROLLER_LOG_ENABLED @@ -301,6 +356,19 @@ config BT_LE_LOG_HCI_BUF_SIZE help Configure the size of the BLE HCI LOG buffer. +config BT_LE_CONTROLLER_LOG_WRAP_PANIC_HANDLER_ENABLE + bool "Enable wrap panic handler" + depends on BT_LE_CONTROLLER_LOG_ENABLED + default n + help + Wrap esp_panic_handler to get controller logs when PC pointer exception crashes. + +config BT_LE_CONTROLLER_LOG_TASK_WDT_USER_HANDLER_ENABLE + bool "Enable esp_task_wdt_isr_user_handler implementation" + depends on BT_LE_CONTROLLER_LOG_ENABLED + default n + help + Implement esp_task_wdt_isr_user_handler to get controller logs when task wdt issue is triggered. config BT_LE_LL_RESOLV_LIST_SIZE int "BLE LL Resolving list size" range 1 5 @@ -356,7 +424,7 @@ config BT_LE_CRYPTO_STACK_MBEDTLS config BT_LE_WHITELIST_SIZE int "BLE white list size" - range 1 15 + range 1 31 default 12 depends on !BT_NIMBLE_ENABLED @@ -377,6 +445,23 @@ config BT_LE_LL_SCA help Sleep clock accuracy of our device (in ppm) +config BT_LE_LL_PEER_SCA_SET_ENABLE + bool "Enable to set constant peer SCA" + default n + help + Enable setting of constant peer SCA, use this if peer device has SCA larger than 500 PPM. + Enable this option, the controller will always use BT_LE_LL_PEER_SCA as the peer SCA value + to calculate the window widening instead of the value received from peer device. + + +config BT_LE_LL_PEER_SCA + int "Constant peer sleep clock accuracy value" + range 0 10000 + depends on BT_LE_LL_PEER_SCA_SET_ENABLE + default 0 + help + Set the sleep clock accuracy of peer device + config BT_LE_MAX_CONNECTIONS int "Maximum number of concurrent connections" depends on !BT_NIMBLE_ENABLED @@ -491,14 +576,22 @@ config BT_LE_TX_CCA_ENABLED help Enable CCA feature to cancel sending the packet if the signal power is stronger than CCA threshold. +config BT_LE_DTM_ENABLED + bool "Enable Direct Test Mode (DTM) feature" + default n + config BT_LE_CCA_RSSI_THRESH int "CCA RSSI threshold value" depends on BT_LE_TX_CCA_ENABLED range 20 100 - default 20 + default 65 help Power threshold of CCA in unit of -1 dBm. +config BT_LE_FEAT_LL_ENCRYPTION + bool "Enable controller ACL encryption" + default y + config BT_LE_ROLE_CENTROL_ENABLE bool "Enable BLE Centrol role function" depends on !BT_NIMBLE_ENABLED @@ -526,3 +619,126 @@ 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 + +config BT_CTRL_RUN_IN_FLASH_ONLY + bool "Reduce BLE IRAM usage (READ DOCS FIRST) (EXPERIMENTAL)" + default n + help + Move most IRAM into flash. This will increase the usage of flash and reduce ble performance. + Because the code is moved to the flash, the execution speed of the code is reduced. + To have a small impact on performance, you need to enable flash suspend (SPI_FLASH_AUTO_SUSPEND). + + - Only one Tx-Rx can be performed in each connection interval. Therefore, reduce the connection interval + as much as possible to improve the throughput. If you want higher connection performance, you can + enable BT_LE_PLACE_CONN_RELATED_INTO_IRAM to put the connection-related code into iram. + - For HCI_LE_Extended_Create_Connection command, only 1M phy's connection parameters will be applied. + Other phys' will be ignored. + - For extended scanning, we may be unable to receive the extended adv with 300us MAFS. + - To match performance, phy needs to be reduced, you need to disable ESP_PHY_IRAM_OPT. + +config BT_LE_PLACE_CONN_RELATED_INTO_IRAM + bool "Place the connection-related code into IRAM" + depends on BT_CTRL_RUN_IN_FLASH_ONLY + default n + +config BT_LE_PLACE_SLEEP_RELATED_INTO_IRAM + bool + depends on BT_CTRL_RUN_IN_FLASH_ONLY && BT_LE_SLEEP_ENABLE + default y + +config BT_LE_CTRL_CHECK_CONNECT_IND_ACCESS_ADDRESS + bool "Enable enhanced Access Address check in CONNECT_IND" + default n + help + Enabling this option will add stricter verification of the Access Address in the CONNECT_IND PDU. + This improves security by ensuring that only connection requests with valid Access Addresses are accepted. + If disabled, only basic checks are applied, improving compatibility. + +menu "BLE disconnects when Instant Passed (0x28) occurs" + config BT_LE_CTRL_LLCP_CONN_UPDATE + bool "BLE ACL connection update procedure" + default n + help + If this option is enabled, Controller will terminate the connection + when Instant Passed (0x28) error occurs during connection update procedure. + + config BT_LE_CTRL_LLCP_CHAN_MAP_UPDATE + bool "BLE ACL channel map update procedure" + default n + help + If this option is enabled, Controller will terminate the connection + when Instant Passed (0x28) error occurs in channel map update procedure. + + config BT_LE_CTRL_LLCP_PHY_UPDATE + bool "BLE ACL PHY update procedure" + default n + help + If this option is enabled, Controller will terminate the connection + when Instant Passed (0x28) error occurs in PHY update procedure. +endmenu + +config BT_CTRL_SCAN_BACKOFF_UPPERLIMITMAX + int "The value of upperlimitmax during scan backoff procedure" + range 1 256 + default 32 + help + The value of upperlimitmax needs to be a power of 2. |
