mirror of
				https://github.com/espressif/esp-idf.git
				synced 2025-11-04 00:51:42 +01:00 
			
		
		
		
	- Support BLE vendor hci set RX sensitivity and AGC gain command - Fixed enhanced TX power setting and getting for legacy adv - Fixed BLE assert lld_con.c 2387 - Fixed compatibility issues during the encryption procedure - Support BLE vendor hci enable CCA command - Added BLE controller debug log trace - Added BLE controller log module
		
			
				
	
	
		
			630 lines
		
	
	
		
			23 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			630 lines
		
	
	
		
			23 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
config BT_CTRL_MODE_EFF
 | 
						||
    int
 | 
						||
    default 1
 | 
						||
 | 
						||
config BT_CTRL_BLE_MAX_ACT
 | 
						||
    int "BLE Max Instances"
 | 
						||
    default 6
 | 
						||
    range 1 10
 | 
						||
    help
 | 
						||
        BLE maximum activities of bluetooth controller,both of connections,
 | 
						||
        scan , sync and adv(periodic adv, multi-adv). Each instance needs to
 | 
						||
        consume 828 bytes, you can save RAM by modifying the instance value
 | 
						||
        according to actual needs.
 | 
						||
 | 
						||
config BT_CTRL_BLE_MAX_ACT_EFF
 | 
						||
    int
 | 
						||
    default BT_CTRL_BLE_MAX_ACT
 | 
						||
    default 0
 | 
						||
 | 
						||
config BT_CTRL_BLE_STATIC_ACL_TX_BUF_NB
 | 
						||
    int "BLE static ACL TX buffer numbers"
 | 
						||
    range 0 12
 | 
						||
    default 0
 | 
						||
    help
 | 
						||
        BLE ACL buffer have two methods to be allocated. One is persistent allocating
 | 
						||
        (allocate when controller initialise, never free until controller de-initialise)
 | 
						||
        another is dynamically allocating (allocate before TX and free after TX).
 | 
						||
 | 
						||
choice BT_CTRL_PINNED_TO_CORE_CHOICE
 | 
						||
    prompt "The cpu core which bluetooth controller run"
 | 
						||
    depends on !FREERTOS_UNICORE
 | 
						||
    help
 | 
						||
        Specify the cpu core to run bluetooth controller.
 | 
						||
        Can not specify no-affinity.
 | 
						||
 | 
						||
    config BT_CTRL_PINNED_TO_CORE_0
 | 
						||
        bool "Core 0 (PRO CPU)"
 | 
						||
    config BT_CTRL_PINNED_TO_CORE_1
 | 
						||
        bool "Core 1 (APP CPU)"
 | 
						||
        depends on !FREERTOS_UNICORE
 | 
						||
endchoice
 | 
						||
 | 
						||
config BT_CTRL_PINNED_TO_CORE
 | 
						||
    int
 | 
						||
    default 0 if BT_CTRL_PINNED_TO_CORE_0
 | 
						||
    default 1 if BT_CTRL_PINNED_TO_CORE_1
 | 
						||
    default 0
 | 
						||
 | 
						||
choice BT_CTRL_HCI_MODE_CHOICE
 | 
						||
    prompt "HCI mode"
 | 
						||
    help
 | 
						||
        Specify HCI mode as VHCI or UART(H4)
 | 
						||
 | 
						||
    config BT_CTRL_HCI_MODE_VHCI
 | 
						||
        bool "VHCI"
 | 
						||
        help
 | 
						||
            Normal option. Mostly, choose this VHCI when bluetooth host run on ESP32S3 or ESP32C3.
 | 
						||
 | 
						||
    config BT_CTRL_HCI_MODE_UART_H4
 | 
						||
        bool "UART(H4)"
 | 
						||
        help
 | 
						||
            If use external bluetooth host which run on other hardware and use UART as the HCI interface,
 | 
						||
            choose this option.
 | 
						||
endchoice
 | 
						||
 | 
						||
config BT_CTRL_HCI_TL
 | 
						||
    int
 | 
						||
    default 0 if BT_CTRL_HCI_MODE_UART_H4
 | 
						||
    default 1 if BT_CTRL_HCI_MODE_VHCI
 | 
						||
    default 1
 | 
						||
    help
 | 
						||
        HCI mode as VHCI or UART(H4)
 | 
						||
 | 
						||
config BT_CTRL_ADV_DUP_FILT_MAX
 | 
						||
    int "The maximum number of 5.0 extend duplicate scan filter"
 | 
						||
    range 1 500
 | 
						||
    default 30
 | 
						||
    help
 | 
						||
        The maximum number of 5.0 extend duplicate
 | 
						||
 | 
						||
choice BT_BLE_CCA_MODE
 | 
						||
    prompt "BLE CCA mode"
 | 
						||
    default BT_BLE_CCA_MODE_NONE
 | 
						||
    help
 | 
						||
        Define BT BLE CCA mode
 | 
						||
        Note that if CCA feature is enabled, the hardware may not transmit packets due to channel busy.
 | 
						||
        Therefore, it may potentially lead to an increase in the time taken for scanning advertising packet
 | 
						||
        and establishing connections, or a decrease in the throughput rate of the connection.
 | 
						||
 | 
						||
    config BT_BLE_CCA_MODE_NONE
 | 
						||
        bool "NONE"
 | 
						||
    config BT_BLE_CCA_MODE_HW
 | 
						||
        bool "Hardware"
 | 
						||
    config BT_BLE_CCA_MODE_SW
 | 
						||
        bool "Software (experimental)"
 | 
						||
endchoice
 | 
						||
 | 
						||
config BT_BLE_CCA_MODE
 | 
						||
    int
 | 
						||
    default 0 if BT_BLE_CCA_MODE_NONE
 | 
						||
    default 1 if BT_BLE_CCA_MODE_HW
 | 
						||
    default 2 if BT_BLE_CCA_MODE_SW
 | 
						||
 | 
						||
config BT_CTRL_HW_CCA_VAL
 | 
						||
    int "CCA threshold value"
 | 
						||
    range 20 100
 | 
						||
    default 20
 | 
						||
    help
 | 
						||
        It is the threshold value of HW CCA, if the value is 30, it means CCA threshold is -30 dBm.
 | 
						||
 | 
						||
config BT_CTRL_HW_CCA_EFF
 | 
						||
    int
 | 
						||
    default 1 if BT_CTRL_HW_CCA
 | 
						||
    default 0
 | 
						||
    help
 | 
						||
        If other devices are sending packets in the air and the signal is strong,
 | 
						||
        the packet hw to be sent this time is cancelled.
 | 
						||
 | 
						||
choice BT_CTRL_CE_LENGTH_TYPE
 | 
						||
    prompt "Connection event length determination method"
 | 
						||
    help
 | 
						||
        Specify connection event length determination
 | 
						||
 | 
						||
    config BT_CTRL_CE_LENGTH_TYPE_ORIG
 | 
						||
        bool "ORIGINAL"
 | 
						||
    config BT_CTRL_CE_LENGTH_TYPE_CE
 | 
						||
        bool "Use CE parameter for HCI command"
 | 
						||
    config BT_CTRL_CE_LENGTH_TYPE_SD
 | 
						||
        bool "Use Espressif self-defined method"
 | 
						||
endchoice
 | 
						||
 | 
						||
config BT_CTRL_CE_LENGTH_TYPE_EFF
 | 
						||
    int
 | 
						||
    default 0 if BT_CTRL_CE_LENGTH_TYPE_ORIG
 | 
						||
    default 1 if BT_CTRL_CE_LENGTH_TYPE_CE
 | 
						||
    default 2 if BT_CTRL_CE_LENGTH_TYPE_SD
 | 
						||
 | 
						||
choice BT_CTRL_TX_ANTENNA_INDEX
 | 
						||
    prompt "default Tx anntena used"
 | 
						||
    help
 | 
						||
        Specify default Tx antenna used for bluetooth
 | 
						||
 | 
						||
    config BT_CTRL_TX_ANTENNA_INDEX_0
 | 
						||
        bool "Antenna 0"
 | 
						||
    config BT_CTRL_TX_ANTENNA_INDEX_1
 | 
						||
        bool "Antenna 1"
 | 
						||
endchoice
 | 
						||
 | 
						||
config BT_CTRL_TX_ANTENNA_INDEX_EFF
 | 
						||
    int
 | 
						||
    default 0 if BT_CTRL_TX_ANTENNA_INDEX_0
 | 
						||
    default 1 if BT_CTRL_TX_ANTENNA_INDEX_1
 | 
						||
 | 
						||
choice BT_CTRL_RX_ANTENNA_INDEX
 | 
						||
    prompt "default Rx anntena used"
 | 
						||
    help
 | 
						||
        Specify default Rx antenna used for bluetooth
 | 
						||
 | 
						||
    config BT_CTRL_RX_ANTENNA_INDEX_0
 | 
						||
        bool "Antenna 0"
 | 
						||
    config BT_CTRL_RX_ANTENNA_INDEX_1
 | 
						||
        bool "Antenna 1"
 | 
						||
endchoice
 | 
						||
 | 
						||
config BT_CTRL_RX_ANTENNA_INDEX_EFF
 | 
						||
    int
 | 
						||
    default 0 if BT_CTRL_RX_ANTENNA_INDEX_0
 | 
						||
    default 1 if BT_CTRL_RX_ANTENNA_INDEX_1
 | 
						||
 | 
						||
choice BT_CTRL_DFT_TX_POWER_LEVEL
 | 
						||
    prompt "BLE default Tx power level"
 | 
						||
    default BT_CTRL_DFT_TX_POWER_LEVEL_P9
 | 
						||
    help
 | 
						||
        Specify default Tx power level
 | 
						||
 | 
						||
    config BT_CTRL_DFT_TX_POWER_LEVEL_N24
 | 
						||
        bool "-24dBm"
 | 
						||
    config BT_CTRL_DFT_TX_POWER_LEVEL_N21
 | 
						||
        bool "-21dBm"
 | 
						||
    config BT_CTRL_DFT_TX_POWER_LEVEL_N18
 | 
						||
        bool "-18dBm"
 | 
						||
    config BT_CTRL_DFT_TX_POWER_LEVEL_N15
 | 
						||
        bool "-15dBm"
 | 
						||
    config BT_CTRL_DFT_TX_POWER_LEVEL_N12
 | 
						||
        bool "-12dBm"
 | 
						||
    config BT_CTRL_DFT_TX_POWER_LEVEL_N9
 | 
						||
        bool "-9dBm"
 | 
						||
    config BT_CTRL_DFT_TX_POWER_LEVEL_N6
 | 
						||
        bool "-6dBm"
 | 
						||
    config BT_CTRL_DFT_TX_POWER_LEVEL_N3
 | 
						||
        bool "-3dBm"
 | 
						||
    config BT_CTRL_DFT_TX_POWER_LEVEL_N0
 | 
						||
        bool "0dBm"
 | 
						||
    config BT_CTRL_DFT_TX_POWER_LEVEL_P3
 | 
						||
        bool "+3dBm"
 | 
						||
    config BT_CTRL_DFT_TX_POWER_LEVEL_P6
 | 
						||
        bool "+6dBm"
 | 
						||
    config BT_CTRL_DFT_TX_POWER_LEVEL_P9
 | 
						||
        bool "+9dBm"
 | 
						||
    config BT_CTRL_DFT_TX_POWER_LEVEL_P12
 | 
						||
        bool "+12dBm"
 | 
						||
    config BT_CTRL_DFT_TX_POWER_LEVEL_P15
 | 
						||
        bool "+15dBm"
 | 
						||
    config BT_CTRL_DFT_TX_POWER_LEVEL_P18
 | 
						||
        bool "+18dBm"
 | 
						||
    config BT_CTRL_DFT_TX_POWER_LEVEL_P20
 | 
						||
        bool "+20dBm"
 | 
						||
endchoice
 | 
						||
 | 
						||
config BT_CTRL_DFT_TX_POWER_LEVEL_EFF
 | 
						||
    int
 | 
						||
    default 0 if BT_CTRL_DFT_TX_POWER_LEVEL_N24
 | 
						||
    default 1 if BT_CTRL_DFT_TX_POWER_LEVEL_N21
 | 
						||
    default 2 if BT_CTRL_DFT_TX_POWER_LEVEL_N18
 | 
						||
    default 3 if BT_CTRL_DFT_TX_POWER_LEVEL_N15
 | 
						||
    default 4 if BT_CTRL_DFT_TX_POWER_LEVEL_N12
 | 
						||
    default 5 if BT_CTRL_DFT_TX_POWER_LEVEL_N9
 | 
						||
    default 6 if BT_CTRL_DFT_TX_POWER_LEVEL_N6
 | 
						||
    default 7 if BT_CTRL_DFT_TX_POWER_LEVEL_N3
 | 
						||
    default 8 if BT_CTRL_DFT_TX_POWER_LEVEL_N0
 | 
						||
    default 9 if BT_CTRL_DFT_TX_POWER_LEVEL_P3
 | 
						||
    default 10 if BT_CTRL_DFT_TX_POWER_LEVEL_P6
 | 
						||
    default 11 if BT_CTRL_DFT_TX_POWER_LEVEL_P9
 | 
						||
    default 12 if BT_CTRL_DFT_TX_POWER_LEVEL_P12
 | 
						||
    default 13 if BT_CTRL_DFT_TX_POWER_LEVEL_P15
 | 
						||
    default 14 if BT_CTRL_DFT_TX_POWER_LEVEL_P18
 | 
						||
    default 15 if BT_CTRL_DFT_TX_POWER_LEVEL_P20
 | 
						||
    default 0
 | 
						||
 | 
						||
config BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_SUPP
 | 
						||
    bool "BLE adv report flow control supported"
 | 
						||
    depends on (!BT_CTRL_RUN_IN_FLASH_ONLY) || (BT_CTRL_RUN_IN_FLASH_ONLY && BT_CTRL_BLE_SCAN)
 | 
						||
    default y
 | 
						||
    help
 | 
						||
        The function is mainly used to enable flow control for advertising reports. When it is enabled,
 | 
						||
        advertising reports will be discarded by the controller if the number of unprocessed advertising
 | 
						||
        reports exceeds the size of BLE adv report flow control.
 | 
						||
 | 
						||
config BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_NUM
 | 
						||
    int "BLE adv report flow control number"
 | 
						||
    depends on BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_SUPP
 | 
						||
    range 50 1000
 | 
						||
    default 100
 | 
						||
    help
 | 
						||
        The number of unprocessed advertising report that bluetooth host can save.If you set
 | 
						||
        `BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_NUM` to a small value, this may cause adv packets lost.
 | 
						||
        If you set `BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_NUM` to a large value, bluetooth host may cache a
 | 
						||
        lot of adv packets and this may cause system memory run out. For example, if you set
 | 
						||
        it to 50, the maximum memory consumed by host is 35 * 50 bytes. Please set
 | 
						||
        `BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_NUM` according to your system free memory and handle adv
 | 
						||
        packets as fast as possible, otherwise it will cause adv packets lost.
 | 
						||
 | 
						||
config BT_CTRL_BLE_ADV_REPORT_DISCARD_THRSHOLD
 | 
						||
    int "BLE adv lost event threshold value"
 | 
						||
    depends on BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_SUPP
 | 
						||
    range 1 1000
 | 
						||
    default 20
 | 
						||
    help
 | 
						||
        When adv report flow control is enabled, The ADV lost event will be generated when the number
 | 
						||
        of ADV packets lost in the controller reaches this threshold. It is better to set a larger value.
 | 
						||
        If you set `BT_CTRL_BLE_ADV_REPORT_DISCARD_THRSHOLD` to a small value or printf every adv lost event, it
 | 
						||
        may cause adv packets lost more.
 | 
						||
 | 
						||
config BT_CTRL_BLE_SCAN_DUPL
 | 
						||
    bool "BLE Scan Duplicate Options"
 | 
						||
    default y
 | 
						||
    help
 | 
						||
        This select enables parameters setting of BLE scan duplicate.
 | 
						||
 | 
						||
choice BT_CTRL_SCAN_DUPL_TYPE
 | 
						||
    prompt "Scan Duplicate Type"
 | 
						||
    default BT_CTRL_SCAN_DUPL_TYPE_DEVICE
 | 
						||
    depends on BT_CTRL_BLE_SCAN_DUPL
 | 
						||
    help
 | 
						||
        Scan duplicate have three ways. one is "Scan Duplicate By Device Address", This way is to use
 | 
						||
        advertiser address filtering. The adv packet of the same address is only allowed to be reported once.
 | 
						||
        Another way is "Scan Duplicate By Device Address And Advertising Data". This way is to use advertising
 | 
						||
        data and device address filtering. All different adv packets with the same address are allowed to be
 | 
						||
        reported. The last way is "Scan Duplicate By Advertising Data". This way is to use advertising data
 | 
						||
        filtering. All same advertising data only allow to be reported once even though they are from
 | 
						||
        different devices.
 | 
						||
 | 
						||
    config BT_CTRL_SCAN_DUPL_TYPE_DEVICE
 | 
						||
        bool "Scan Duplicate By Device Address"
 | 
						||
        help
 | 
						||
            Advertising packets with the same address, address type, and advertising type are reported once.
 | 
						||
 | 
						||
    config BT_CTRL_SCAN_DUPL_TYPE_DATA
 | 
						||
        bool "Scan Duplicate By Advertising Data"
 | 
						||
        help
 | 
						||
            Advertising packets with identical advertising data, address type, and advertising type
 | 
						||
            are reported only once, even if they originate from different devices.
 | 
						||
 | 
						||
    config BT_CTRL_SCAN_DUPL_TYPE_DATA_DEVICE
 | 
						||
        bool "Scan Duplicate By Device Address And Advertising Data"
 | 
						||
        help
 | 
						||
            Advertising packets with the same address, advertising data, address type,
 | 
						||
            and advertising type are reported only once.
 | 
						||
endchoice
 | 
						||
 | 
						||
config BT_CTRL_SCAN_DUPL_TYPE
 | 
						||
    int
 | 
						||
    depends on BT_CTRL_BLE_SCAN_DUPL
 | 
						||
    default 0 if BT_CTRL_SCAN_DUPL_TYPE_DEVICE
 | 
						||
    default 1 if BT_CTRL_SCAN_DUPL_TYPE_DATA
 | 
						||
    default 2 if BT_CTRL_SCAN_DUPL_TYPE_DATA_DEVICE
 | 
						||
    default 0
 | 
						||
 | 
						||
config BT_CTRL_SCAN_DUPL_CACHE_SIZE
 | 
						||
    int "Maximum number of devices in scan duplicate filter"
 | 
						||
    depends on BT_CTRL_BLE_SCAN_DUPL
 | 
						||
    range 10 1000
 | 
						||
    default 100
 | 
						||
    help
 | 
						||
        Maximum number of devices which can be recorded in scan duplicate filter.
 | 
						||
        When the maximum amount of device in the filter is reached, the cache will be refreshed.
 | 
						||
 | 
						||
config BT_CTRL_DUPL_SCAN_CACHE_REFRESH_PERIOD
 | 
						||
    int "Duplicate scan list refresh period (seconds)"
 | 
						||
    depends on BT_CTRL_BLE_SCAN_DUPL
 | 
						||
    range 0 1000
 | 
						||
    default 0
 | 
						||
    help
 | 
						||
        If the period value is non-zero, the controller will periodically clear the device information
 | 
						||
        stored in the scan duuplicate filter. If it is 0, the scan duuplicate filter will not be cleared
 | 
						||
        until the scanning is disabled. Duplicate advertisements for this period should not be sent to the
 | 
						||
        Host in advertising report events.
 | 
						||
        There are two scenarios where the ADV packet will be repeatedly reported:
 | 
						||
        1. The duplicate scan cache is full, the controller will delete the oldest device information and
 | 
						||
        add new device information.
 | 
						||
        2. When the refresh period is up, the controller will clear all device information and start filtering
 | 
						||
        again.
 | 
						||
 | 
						||
config BT_CTRL_BLE_MESH_SCAN_DUPL_EN
 | 
						||
    bool "Special duplicate scan mechanism for BLE Mesh scan"
 | 
						||
    depends on BT_CTRL_BLE_SCAN_DUPL
 | 
						||
    default n
 | 
						||
    help
 | 
						||
        This enables the BLE scan duplicate for special BLE Mesh scan.
 | 
						||
 | 
						||
config BT_CTRL_MESH_DUPL_SCAN_CACHE_SIZE
 | 
						||
    int "Maximum number of Mesh adv packets in scan duplicate filter"
 | 
						||
    depends on BT_CTRL_BLE_MESH_SCAN_DUPL_EN
 | 
						||
    range 10 1000
 | 
						||
    default 100
 | 
						||
    help
 | 
						||
        Maximum number of adv packets which can be recorded in duplicate scan cache for BLE Mesh.
 | 
						||
        When the maximum amount of device in the filter is reached, the cache will be refreshed.
 | 
						||
 | 
						||
choice BT_CTRL_COEX_PHY_CODED_TX_RX_TLIM
 | 
						||
    prompt "Coexistence: limit on MAX Tx/Rx time for coded-PHY connection"
 | 
						||
    default BT_CTRL_COEX_PHY_CODED_TX_RX_TLIM_DIS
 | 
						||
    depends on ESP_COEX_SW_COEXIST_ENABLE
 | 
						||
    help
 | 
						||
        When using PHY-Coded in BLE connection, limitation on max tx/rx time can be applied to
 | 
						||
        better avoid dramatic performance deterioration of Wi-Fi.
 | 
						||
 | 
						||
    config BT_CTRL_COEX_PHY_CODED_TX_RX_TLIM_EN
 | 
						||
        bool "Force Enable"
 | 
						||
        help
 | 
						||
            Always enable the limitation on max tx/rx time for Coded-PHY connection
 | 
						||
 | 
						||
    config BT_CTRL_COEX_PHY_CODED_TX_RX_TLIM_DIS
 | 
						||
        bool "Force Disable"
 | 
						||
        help
 | 
						||
            Disable the limitation on max tx/rx time for Coded-PHY connection
 | 
						||
endchoice
 | 
						||
 | 
						||
config BT_CTRL_COEX_PHY_CODED_TX_RX_TLIM_EFF
 | 
						||
    int
 | 
						||
    default 0 if !ESP_COEX_SW_COEXIST_ENABLE
 | 
						||
    default 1 if BT_CTRL_COEX_PHY_CODED_TX_RX_TLIM_EN
 | 
						||
    default 0 if BT_CTRL_COEX_PHY_CODED_TX_RX_TLIM_DIS
 | 
						||
 | 
						||
menu "MODEM SLEEP Options"
 | 
						||
    visible if BT_ENABLED
 | 
						||
 | 
						||
    config BT_CTRL_MODEM_SLEEP
 | 
						||
        bool "Bluetooth modem sleep"
 | 
						||
        depends on !BT_CTRL_HCI_MODE_UART_H4
 | 
						||
        default n
 | 
						||
        help
 | 
						||
            Enable/disable bluetooth controller low power mode.
 | 
						||
            Modem sleep is not supported to be used with UART HCI.
 | 
						||
 | 
						||
    config BT_CTRL_MODEM_SLEEP_MODE_1
 | 
						||
        bool "Bluetooth Modem sleep Mode 1"
 | 
						||
        depends on BT_CTRL_MODEM_SLEEP
 | 
						||
        default y
 | 
						||
        help
 | 
						||
            Mode 1 is the currently supported sleep mode. In this mode,
 | 
						||
            bluetooth controller sleeps between and BLE events. A low
 | 
						||
            power clock is used to maintain bluetooth reference clock.
 | 
						||
 | 
						||
    choice BT_CTRL_LOW_POWER_CLOCK
 | 
						||
        prompt "Bluetooth low power clock"
 | 
						||
        depends on BT_CTRL_MODEM_SLEEP_MODE_1
 | 
						||
        help
 | 
						||
            Select the low power clock source for bluetooth controller
 | 
						||
 | 
						||
        config BT_CTRL_LPCLK_SEL_MAIN_XTAL
 | 
						||
            bool "Main crystal"
 | 
						||
            help
 | 
						||
                Main crystal can be used as low power clock for bluetooth modem sleep. If this option is
 | 
						||
                selected, bluetooth modem sleep can work under Dynamic Frequency Scaling(DFS) enabled, and
 | 
						||
                bluetooth can work under light sleep enabled. Main crystal has a relatively better performance
 | 
						||
                than other bluetooth low power clock sources.
 | 
						||
        config BT_CTRL_LPCLK_SEL_EXT_32K_XTAL
 | 
						||
            bool "External 32kHz crystal/oscillator"
 | 
						||
            depends on RTC_CLK_SRC_EXT_CRYS || RTC_CLK_SRC_EXT_OSC
 | 
						||
            help
 | 
						||
                External 32kHz crystal/oscillator has a nominal frequency of 32.768kHz and provides good frequency
 | 
						||
                stability. If used as Bluetooth low power clock, External 32kHz can support Bluetooth
 | 
						||
                modem sleep to be used with both DFS and light sleep.
 | 
						||
 | 
						||
        config BT_CTRL_LPCLK_SEL_RTC_SLOW
 | 
						||
            bool "Internal 150kHz RC oscillator"
 | 
						||
            depends on RTC_CLK_SRC_INT_RC
 | 
						||
            help
 | 
						||
                Internal 150kHz RC oscillator. The accuracy of this clock is a lot larger than 500ppm which is required
 | 
						||
                in Bluetooth communication, so don't select this option in scenarios such as BLE connection state.
 | 
						||
    endchoice
 | 
						||
 | 
						||
    config BT_CTRL_MAIN_XTAL_PU_DURING_LIGHT_SLEEP
 | 
						||
        bool "power up main XTAL during light sleep"
 | 
						||
        depends on (BT_CTRL_LPCLK_SEL_MAIN_XTAL || BT_CTRL_LPCLK_SEL_EXT_32K_XTAL) && FREERTOS_USE_TICKLESS_IDLE
 | 
						||
        default n
 | 
						||
        help
 | 
						||
            If this option is selected, the main crystal will power up during light sleep when the low power clock
 | 
						||
            selects an external 32kHz crystal but the external 32kHz crystal does not exist or the low power clock
 | 
						||
            selects the main crystal.
 | 
						||
 | 
						||
endmenu
 | 
						||
 | 
						||
config BT_CTRL_SLEEP_MODE_EFF
 | 
						||
    int
 | 
						||
    default 1 if BT_CTRL_MODEM_SLEEP_MODE_1
 | 
						||
    default 0
 | 
						||
 | 
						||
config BT_CTRL_SLEEP_CLOCK_EFF
 | 
						||
    int
 | 
						||
    default 1 if BT_CTRL_LPCLK_SEL_MAIN_XTAL
 | 
						||
    default 2 if BT_CTRL_LPCLK_SEL_EXT_32K_XTAL
 | 
						||
    default 3 if BT_CTRL_LPCLK_SEL_RTC_SLOW
 | 
						||
 | 
						||
    default 0
 | 
						||
 | 
						||
config BT_CTRL_HCI_TL_EFF
 | 
						||
    int
 | 
						||
    default 0 if BT_CTRL_HCI_MODE_UART_H4
 | 
						||
    default 1 if BT_CTRL_HCI_MODE_VHCI
 | 
						||
    default 1
 | 
						||
 | 
						||
config BT_CTRL_AGC_RECORRECT_EN
 | 
						||
    bool "Enable HW AGC recorrect"
 | 
						||
    default n
 | 
						||
    help
 | 
						||
        Enable uncoded phy AGC recorrect
 | 
						||
 | 
						||
config BT_CTRL_CODED_AGC_RECORRECT_EN
 | 
						||
    bool "Enable coded phy AGC recorrect"
 | 
						||
    depends on BT_CTRL_AGC_RECORRECT_EN
 | 
						||
    default n
 | 
						||
    help
 | 
						||
        Enable coded phy AGC recorrect
 | 
						||
 | 
						||
config BT_CTRL_SCAN_BACKOFF_UPPERLIMITMAX
 | 
						||
    bool "Disable active scan backoff"
 | 
						||
    default n
 | 
						||
    help
 | 
						||
        Disable active scan backoff. The bluetooth spec requires that scanners should run a backoff procedure to
 | 
						||
        minimize collision of scan request PDUs from nultiple scanners. If scan backoff is disabled, in active
 | 
						||
        scanning, scan request PDU will be sent every time when HW receives scannable ADV PDU.
 | 
						||
 | 
						||
config BT_BLE_ADV_DATA_LENGTH_ZERO_AUX
 | 
						||
    bool "Enable aux packet when ext adv data length is zero"
 | 
						||
    default n
 | 
						||
    help
 | 
						||
        When this option is enabled, auxiliary packets will be present in the events of
 | 
						||
        'Non-Connectable and Non-Scannable' regardless of whether the advertising length is 0.
 | 
						||
        If this option is not enabled, auxiliary packets will only be present when the advertising length is not 0.
 | 
						||
 | 
						||
config BT_CTRL_CHAN_ASS_EN
 | 
						||
    bool "Enable channel assessment"
 | 
						||
    default y
 | 
						||
    help
 | 
						||
        If this option is enabled, The Controller will records the communication quality
 | 
						||
        for each channel and then start a timer to check and update the channel map every 4 seconds.
 | 
						||
 | 
						||
config BT_CTRL_LE_PING_EN
 | 
						||
    bool "Enable LE Ping procedure"
 | 
						||
    default y
 | 
						||
    help
 | 
						||
        If this option is disabled, The Controller will not start the LE authenticated payload timer.
 | 
						||
        This option is used for some compatibility problems related to LE ping procedure.
 | 
						||
 | 
						||
menu "BLE disconnects when Instant Passed (0x28) occurs"
 | 
						||
    config BT_CTRL_BLE_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_CTRL_BLE_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_CTRL_BLE_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_RUN_IN_FLASH_ONLY
 | 
						||
    bool "Put all BLE Controller code in flash"
 | 
						||
    default n
 | 
						||
    help
 | 
						||
        If this option is enabled, all code for the Bluetooth controller will be moved from ROM and IRAM
 | 
						||
        to flash, saving over 20K bytes of memory. However, it will require more flash resources and the
 | 
						||
        performance of Bluetooth will decrease If this option is enabled, Bluetooth may not work properly
 | 
						||
        during erasing flash. It is recommended to turn on the auto suspend function of flash. After auto
 | 
						||
        suspend is turned on, Bluetooth interrupts can be executed normally during erasing flash, with less
 | 
						||
        impact on Bluetooth performance.
 | 
						||
 | 
						||
config BT_CTRL_DTM_ENABLE
 | 
						||
    depends on BT_CTRL_RUN_IN_FLASH_ONLY
 | 
						||
    bool "Enable direct test mode feature"
 | 
						||
    default n
 | 
						||
 | 
						||
config BT_CTRL_BLE_MASTER
 | 
						||
    depends on BT_CTRL_RUN_IN_FLASH_ONLY
 | 
						||
    bool "Enable BLE master role feature"
 | 
						||
    default y
 | 
						||
 | 
						||
config BT_CTRL_BLE_TEST
 | 
						||
    depends on BT_CTRL_RUN_IN_FLASH_ONLY
 | 
						||
    bool "Enable BLE QA test feature"
 | 
						||
    default n
 | 
						||
 | 
						||
config BT_CTRL_BLE_SCAN
 | 
						||
    depends on BT_CTRL_RUN_IN_FLASH_ONLY
 | 
						||
    bool "Enable BLE scan feature"
 | 
						||
    default y
 | 
						||
 | 
						||
config BT_CTRL_BLE_SECURITY_ENABLE
 | 
						||
    depends on BT_CTRL_RUN_IN_FLASH_ONLY && BT_CONTROLLER_ONLY
 | 
						||
    bool "Enable BLE security feature"
 | 
						||
    default y
 | 
						||
 | 
						||
config BT_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 "Controller debug log Options (Experimental)"
 | 
						||
    config BT_CTRL_LE_LOG_EN
 | 
						||
        depends on BT_CTRL_RUN_IN_FLASH_ONLY
 | 
						||
        bool "Enable BLE debug log"
 | 
						||
        default n
 | 
						||
 | 
						||
    config BT_CTRL_LE_HCI_LOG_EN
 | 
						||
        depends on BT_CTRL_LE_LOG_EN
 | 
						||
        bool "Enable BLE HCI log"
 | 
						||
        default n
 | 
						||
 | 
						||
    config BT_CTRL_LE_LOG_DUMP_ONLY
 | 
						||
        depends on BT_CTRL_LE_LOG_EN
 | 
						||
        bool "Enable BLE log dump only"
 | 
						||
        default n
 | 
						||
 | 
						||
    config BT_CTRL_LE_LOG_STORAGE_EN
 | 
						||
        depends on BT_CTRL_LE_LOG_EN
 | 
						||
        bool "Enable BLE log storage to flash"
 | 
						||
        default n
 | 
						||
 | 
						||
    config BT_CTRL_LE_LOG_PARTITION_SIZE
 | 
						||
        int "The size of ble controller log partition(Multiples of 4K)"
 | 
						||
        depends on BT_CTRL_LE_LOG_STORAGE_EN
 | 
						||
        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_CTRL_LE_LOG_SPI_OUT_EN
 | 
						||
        bool "Output ble controller logs to SPI bus"
 | 
						||
        depends on BT_CTRL_LE_LOG_EN
 | 
						||
        depends on !BT_CTRL_LE_LOG_DUMP_ONLY
 | 
						||
        select BT_BLE_LOG_SPI_OUT_ENABLED
 | 
						||
        default n
 | 
						||
        help
 | 
						||
            Output ble controller logs to SPI bus
 | 
						||
 | 
						||
    config BT_CTRL_LE_LOG_MODE_EN
 | 
						||
        depends on BT_CTRL_LE_LOG_EN
 | 
						||
        int "Enable log for specified BLE mode"
 | 
						||
        range 0 4095
 | 
						||
        default 4093
 | 
						||
 | 
						||
    config BT_CTRL_LE_LOG_LEVEL
 | 
						||
        depends on BT_CTRL_LE_LOG_EN
 | 
						||
        int "The level of BLE log"
 | 
						||
        range 0 5
 | 
						||
        default 2
 | 
						||
 | 
						||
    config BT_CTRL_LE_LOG_BUF1_SIZE
 | 
						||
        depends on BT_CTRL_LE_LOG_EN
 | 
						||
        int "The size of BLE log buffer1"
 | 
						||
        default 1024
 | 
						||
 | 
						||
    config BT_CTRL_LE_LOG_HCI_BUF_SIZE
 | 
						||
        depends on BT_CTRL_LE_LOG_EN
 | 
						||
        int "The size of BLE log HCI buffer"
 | 
						||
        default 1024
 | 
						||
 | 
						||
    config BT_CTRL_LE_LOG_BUF2_SIZE
 | 
						||
        depends on BT_CTRL_LE_LOG_EN
 | 
						||
        int "The size of BLE log buffer2"
 | 
						||
        default 1024
 | 
						||
endmenu
 |