Kconfig.in 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469
  1. config BT_CTRL_MODE_EFF
  2. int
  3. default 1
  4. config BT_CTRL_BLE_MAX_ACT
  5. int "BLE Max Instances"
  6. default 6
  7. range 1 10
  8. help
  9. BLE maximum activities of bluetooth controller,both of connections,
  10. scan , sync and adv(periodic adv, multi-adv). Each instance needs to
  11. consume 828 bytes, you can save RAM by modifying the instance value
  12. according to actual needs.
  13. config BT_CTRL_BLE_MAX_ACT_EFF
  14. int
  15. default BT_CTRL_BLE_MAX_ACT
  16. default 0
  17. config BT_CTRL_BLE_STATIC_ACL_TX_BUF_NB
  18. int "BLE static ACL TX buffer numbers"
  19. range 0 12
  20. default 0
  21. help
  22. BLE ACL buffer have two methods to be allocated. One is persistent allocating
  23. (alloate when controller initialise, never free until controller de-initialise)
  24. another is dynamically allocating (allocate before TX and free after TX).
  25. choice BT_CTRL_PINNED_TO_CORE_CHOICE
  26. prompt "The cpu core which bluetooth controller run"
  27. depends on !FREERTOS_UNICORE
  28. help
  29. Specify the cpu core to run bluetooth controller.
  30. Can not specify no-affinity.
  31. config BT_CTRL_PINNED_TO_CORE_0
  32. bool "Core 0 (PRO CPU)"
  33. config BT_CTRL_PINNED_TO_CORE_1
  34. bool "Core 1 (APP CPU)"
  35. depends on !FREERTOS_UNICORE
  36. endchoice
  37. config BT_CTRL_PINNED_TO_CORE
  38. int
  39. default 0 if BT_CTRL_PINNED_TO_CORE_0
  40. default 1 if BT_CTRL_PINNED_TO_CORE_1
  41. default 0
  42. choice BT_CTRL_HCI_MODE_CHOICE
  43. prompt "HCI mode"
  44. help
  45. Specify HCI mode as VHCI or UART(H4)
  46. config BT_CTRL_HCI_MODE_VHCI
  47. bool "VHCI"
  48. help
  49. Normal option. Mostly, choose this VHCI when bluetooth host run on ESP32S3 or ESP32C3.
  50. config BT_CTRL_HCI_MODE_UART_H4
  51. bool "UART(H4)"
  52. help
  53. If use external bluetooth host which run on other hardware and use UART as the HCI interface,
  54. choose this option.
  55. endchoice
  56. config BT_CTRL_HCI_TL
  57. int
  58. default 0 if BT_CTRL_HCI_MODE_UART_H4
  59. default 1 if BT_CTRL_HCI_M0DE_VHCI
  60. default 1
  61. help
  62. HCI mode as VHCI or UART(H4)
  63. config BT_CTRL_ADV_DUP_FILT_MAX
  64. int "The maxinum number of 5.0 extend duplicate scan filter"
  65. range 1 500
  66. default 30
  67. help
  68. The maxinum number of suplicate scan filter
  69. choice BT_BLE_CCA_MODE
  70. prompt "BLE CCA mode"
  71. default BT_BLE_CCA_MODE_NONE
  72. help
  73. Define BT BLE CCA mode
  74. config BT_BLE_CCA_MODE_NONE
  75. bool "NONE"
  76. config BT_BLE_CCA_MODE_HW
  77. bool "Hardware"
  78. config BT_BLE_CCA_MODE_SW
  79. bool "Software"
  80. endchoice
  81. config BT_BLE_CCA_MODE
  82. int
  83. default 0 if BT_BLE_CCA_MODE_NONE
  84. default 1 if BT_BLE_CCA_MODE_HW
  85. default 2 if BT_BLE_CCA_MODE_SW
  86. config BT_CTRL_HW_CCA_VAL
  87. int "CCA threshold value"
  88. range 20 100
  89. default 20
  90. help
  91. It is the threshold value of HW CCA, if the value is 30, it means CCA threshold is -30 dBm.
  92. config BT_CTRL_HW_CCA_EFF
  93. int
  94. default 1 if BT_CTRL_HW_CCA
  95. default 0
  96. help
  97. If other devices are sending packets in the air and the signal is strong,
  98. the packet hw to be sent this time is cancelled.
  99. choice BT_CTRL_CE_LENGTH_TYPE
  100. prompt "Connection event length determination method"
  101. help
  102. Specify connection event length determination
  103. config BT_CTRL_CE_LENGTH_TYPE_ORIG
  104. bool "ORIGINAL"
  105. config BT_CTRL_CE_LENGTH_TYPE_CE
  106. bool "Use CE parameter for HCI command"
  107. config BT_CTRL_CE_LENGTH_TYPE_SD
  108. bool "Use Espressif self-defined method"
  109. endchoice
  110. config BT_CTRL_CE_LENGTH_TYPE_EFF
  111. int
  112. default 0 if BT_CTRL_CE_LENGTH_TYPE_ORIG
  113. default 1 if BT_CTRL_CE_LENGTH_TYPE_CE
  114. default 2 if BT_CTRL_CE_LENGTH_TYPE_SD
  115. choice BT_CTRL_TX_ANTENNA_INDEX
  116. prompt "default Tx anntena used"
  117. help
  118. Specify default Tx antenna used for bluetooth
  119. config BT_CTRL_TX_ANTENNA_INDEX_0
  120. bool "Antenna 0"
  121. config BT_CTRL_TX_ANTENNA_INDEX_1
  122. bool "Antenna 1"
  123. endchoice
  124. config BT_CTRL_TX_ANTENNA_INDEX_EFF
  125. int
  126. default 0 if BT_CTRL_TX_ANTENNA_INDEX_0
  127. default 1 if BT_CTRL_TX_ANTENNA_INDEX_1
  128. choice BT_CTRL_RX_ANTENNA_INDEX
  129. prompt "default Rx anntena used"
  130. help
  131. Specify default Rx antenna used for bluetooth
  132. config BT_CTRL_RX_ANTENNA_INDEX_0
  133. bool "Antenna 0"
  134. config BT_CTRL_RX_ANTENNA_INDEX_1
  135. bool "Antenna 1"
  136. endchoice
  137. config BT_CTRL_RX_ANTENNA_INDEX_EFF
  138. int
  139. default 0 if BT_CTRL_RX_ANTENNA_INDEX_0
  140. default 1 if BT_CTRL_RX_ANTENNA_INDEX_1
  141. choice BT_CTRL_DFT_TX_POWER_LEVEL
  142. prompt "BLE default Tx power level"
  143. default BT_CTRL_DFT_TX_POWER_LEVEL_P9
  144. help
  145. Specify default Tx power level
  146. config BT_CTRL_DFT_TX_POWER_LEVEL_N24
  147. bool "-24dBm"
  148. config BT_CTRL_DFT_TX_POWER_LEVEL_N21
  149. bool "-21dBm"
  150. config BT_CTRL_DFT_TX_POWER_LEVEL_N18
  151. bool "-18dBm"
  152. config BT_CTRL_DFT_TX_POWER_LEVEL_N15
  153. bool "-15dBm"
  154. config BT_CTRL_DFT_TX_POWER_LEVEL_N12
  155. bool "-12dBm"
  156. config BT_CTRL_DFT_TX_POWER_LEVEL_N9
  157. bool "-9dBm"
  158. config BT_CTRL_DFT_TX_POWER_LEVEL_N6
  159. bool "-6dBm"
  160. config BT_CTRL_DFT_TX_POWER_LEVEL_N3
  161. bool "-3dBm"
  162. config BT_CTRL_DFT_TX_POWER_LEVEL_N0
  163. bool "0dBm"
  164. config BT_CTRL_DFT_TX_POWER_LEVEL_P3
  165. bool "+3dBm"
  166. config BT_CTRL_DFT_TX_POWER_LEVEL_P6
  167. bool "+6dBm"
  168. config BT_CTRL_DFT_TX_POWER_LEVEL_P9
  169. bool "+9dBm"
  170. config BT_CTRL_DFT_TX_POWER_LEVEL_P12
  171. bool "+12dBm"
  172. config BT_CTRL_DFT_TX_POWER_LEVEL_P15
  173. bool "+15dBm"
  174. config BT_CTRL_DFT_TX_POWER_LEVEL_P18
  175. bool "+18dBm"
  176. config BT_CTRL_DFT_TX_POWER_LEVEL_P21
  177. bool "+21dBm"
  178. endchoice
  179. config BT_CTRL_DFT_TX_POWER_LEVEL_EFF
  180. int
  181. default 0 if BT_CTRL_DFT_TX_POWER_LEVEL_N24
  182. default 1 if BT_CTRL_DFT_TX_POWER_LEVEL_N21
  183. default 2 if BT_CTRL_DFT_TX_POWER_LEVEL_N18
  184. default 3 if BT_CTRL_DFT_TX_POWER_LEVEL_N15
  185. default 4 if BT_CTRL_DFT_TX_POWER_LEVEL_N12
  186. default 5 if BT_CTRL_DFT_TX_POWER_LEVEL_N9
  187. default 6 if BT_CTRL_DFT_TX_POWER_LEVEL_N6
  188. default 7 if BT_CTRL_DFT_TX_POWER_LEVEL_N3
  189. default 8 if BT_CTRL_DFT_TX_POWER_LEVEL_N0
  190. default 9 if BT_CTRL_DFT_TX_POWER_LEVEL_P3
  191. default 10 if BT_CTRL_DFT_TX_POWER_LEVEL_P6
  192. default 11 if BT_CTRL_DFT_TX_POWER_LEVEL_P9
  193. default 12 if BT_CTRL_DFT_TX_POWER_LEVEL_P12
  194. default 13 if BT_CTRL_DFT_TX_POWER_LEVEL_P15
  195. default 14 if BT_CTRL_DFT_TX_POWER_LEVEL_P18
  196. default 15 if BT_CTRL_DFT_TX_POWER_LEVEL_P21
  197. default 0
  198. config BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_SUPP
  199. bool "BLE adv report flow control supported"
  200. default y
  201. help
  202. The function is mainly used to enable flow control for advertising reports. When it is enabled,
  203. advertising reports will be discarded by the controller if the number of unprocessed advertising
  204. reports exceeds the size of BLE adv report flow control.
  205. config BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_NUM
  206. int "BLE adv report flow control number"
  207. depends on BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_SUPP
  208. range 50 1000
  209. default 100
  210. help
  211. The number of unprocessed advertising report that bluetooth host can save.If you set
  212. `BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_NUM` to a small value, this may cause adv packets lost.
  213. If you set `BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_NUM` to a large value, bluetooth host may cache a
  214. lot of adv packets and this may cause system memory run out. For example, if you set
  215. it to 50, the maximum memory consumed by host is 35 * 50 bytes. Please set
  216. `BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_NUM` according to your system free memory and handle adv
  217. packets as fast as possible, otherwise it will cause adv packets lost.
  218. config BT_CTRL_BLE_ADV_REPORT_DISCARD_THRSHOLD
  219. int "BLE adv lost event threshold value"
  220. depends on BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_SUPP
  221. range 1 1000
  222. default 20
  223. help
  224. When adv report flow control is enabled, The ADV lost event will be generated when the number
  225. of ADV packets lost in the controller reaches this threshold. It is better to set a larger value.
  226. If you set `BT_CTRL_BLE_ADV_REPORT_DISCARD_THRSHOLD` to a small value or printf every adv lost event, it
  227. may cause adv packets lost more.
  228. config BT_CTRL_BLE_SCAN_DUPL
  229. bool "BLE Scan Duplicate Options"
  230. default y
  231. help
  232. This select enables parameters setting of BLE scan duplicate.
  233. choice BT_CTRL_SCAN_DUPL_TYPE
  234. prompt "Scan Duplicate Type"
  235. default BT_CTRL_SCAN_DUPL_TYPE_DEVICE
  236. depends on BT_CTRL_BLE_SCAN_DUPL
  237. help
  238. Scan duplicate have three ways. one is "Scan Duplicate By Device Address", This way is to use
  239. advertiser address filtering. The adv packet of the same address is only allowed to be reported once.
  240. Another way is "Scan Duplicate By Device Address And Advertising Data". This way is to use advertising
  241. data and device address filtering. All different adv packets with the same address are allowed to be
  242. reported. The last way is "Scan Duplicate By Advertising Data". This way is to use advertising data
  243. filtering. All same advertising data only allow to be reported once even though they are from
  244. different devices.
  245. config BT_CTRL_SCAN_DUPL_TYPE_DEVICE
  246. bool "Scan Duplicate By Device Address"
  247. help
  248. Advertising packets with the same address, address type, and advertising type are reported once.
  249. config BT_CTRL_SCAN_DUPL_TYPE_DATA
  250. bool "Scan Duplicate By Advertising Data"
  251. help
  252. Advertising packets with identical advertising data, address type, and advertising type
  253. are reported only once, even if they originate from different devices.
  254. config BT_CTRL_SCAN_DUPL_TYPE_DATA_DEVICE
  255. bool "Scan Duplicate By Device Address And Advertising Data"
  256. help
  257. Advertising packets with the same address, advertising data, address type,
  258. and advertising type are reported only once.
  259. endchoice
  260. config BT_CTRL_SCAN_DUPL_TYPE
  261. int
  262. depends on BT_CTRL_BLE_SCAN_DUPL
  263. default 0 if BT_CTRL_SCAN_DUPL_TYPE_DEVICE
  264. default 1 if BT_CTRL_SCAN_DUPL_TYPE_DATA
  265. default 2 if BT_CTRL_SCAN_DUPL_TYPE_DATA_DEVICE
  266. default 0
  267. config BT_CTRL_SCAN_DUPL_CACHE_SIZE
  268. int "Maximum number of devices in scan duplicate filter"
  269. depends on BT_CTRL_BLE_SCAN_DUPL
  270. range 10 1000
  271. default 100
  272. help
  273. Maximum number of devices which can be recorded in scan duplicate filter.
  274. When the maximum amount of device in the filter is reached, the cache will be refreshed.
  275. config BT_CTRL_DUPL_SCAN_CACHE_REFRESH_PERIOD
  276. int "Duplicate scan list refresh period (seconds)"
  277. depends on BT_CTRL_BLE_SCAN_DUPL
  278. range 0 1000
  279. default 0
  280. help
  281. If the period value is non-zero, the controller will periodically clear the device information
  282. stored in the scan duuplicate filter. If it is 0, the scan duuplicate filter will not be cleared
  283. until the scanning is disabled. Duplicate advertisements for this period should not be sent to the
  284. Host in advertising report events.
  285. There are two scenarios where the ADV packet will be repeatedly reported:
  286. 1. The duplicate scan cache is full, the controller will delete the oldest device information and
  287. add new device information.
  288. 2. When the refresh period is up, the controller will clear all device information and start filtering
  289. again.
  290. config BT_CTRL_BLE_MESH_SCAN_DUPL_EN
  291. bool "Special duplicate scan mechanism for BLE Mesh scan"
  292. depends on BT_CTRL_BLE_SCAN_DUPL
  293. default n
  294. help
  295. This enables the BLE scan duplicate for special BLE Mesh scan.
  296. config BT_CTRL_MESH_DUPL_SCAN_CACHE_SIZE
  297. int "Maximum number of Mesh adv packets in scan duplicate filter"
  298. depends on BT_CTRL_BLE_MESH_SCAN_DUPL_EN
  299. range 10 1000
  300. default 100
  301. help
  302. Maximum number of adv packets which can be recorded in duplicate scan cache for BLE Mesh.
  303. When the maximum amount of device in the filter is reached, the cache will be refreshed.
  304. choice BT_CTRL_COEX_PHY_CODED_TX_RX_TLIM
  305. prompt "Coexistence: limit on MAX Tx/Rx time for coded-PHY connection"
  306. default BT_CTRL_COEX_PHY_CODED_TX_RX_TLIM_DIS
  307. depends on ESP_COEX_SW_COEXIST_ENABLE
  308. help
  309. When using PHY-Coded in BLE connection, limitation on max tx/rx time can be applied to
  310. better avoid dramatic performance deterioration of Wi-Fi.
  311. config BT_CTRL_COEX_PHY_CODED_TX_RX_TLIM_EN
  312. bool "Force Enable"
  313. help
  314. Always enable the limitation on max tx/rx time for Coded-PHY connection
  315. config BT_CTRL_COEX_PHY_CODED_TX_RX_TLIM_DIS
  316. bool "Force Disable"
  317. help
  318. Disable the limitation on max tx/rx time for Coded-PHY connection
  319. endchoice
  320. config BT_CTRL_COEX_PHY_CODED_TX_RX_TLIM_EFF
  321. int
  322. default 0 if !ESP_COEX_SW_COEXIST_ENABLE
  323. default 1 if BT_CTRL_COEX_PHY_CODED_TX_RX_TLIM_EN
  324. default 0 if BT_CTRL_COEX_PHY_CODED_TX_RX_TLIM_DIS
  325. menu "MODEM SLEEP Options"
  326. visible if BT_ENABLED
  327. config BT_CTRL_MODEM_SLEEP
  328. bool "Bluetooth modem sleep"
  329. depends on !BT_CTRL_HCI_MODE_UART_H4
  330. default n
  331. help
  332. Enable/disable bluetooth controller low power mode.
  333. Modem sleep is not supported to be used with UART HCI.
  334. config BT_CTRL_MODEM_SLEEP_MODE_1
  335. bool "Bluetooth Modem sleep Mode 1"
  336. depends on BT_CTRL_MODEM_SLEEP
  337. default y
  338. help
  339. Mode 1 is the currently supported sleep mode. In this mode,
  340. bluetooth controller sleeps between and BLE events. A low
  341. power clock is used to maintain bluetooth reference clock.
  342. choice BT_CTRL_LOW_POWER_CLOCK
  343. prompt "Bluetooth low power clock"
  344. depends on BT_CTRL_MODEM_SLEEP_MODE_1
  345. help
  346. Select the low power clock source for bluetooth controller
  347. config BT_CTRL_LPCLK_SEL_MAIN_XTAL
  348. bool "Main crystal"
  349. help
  350. Main crystal can be used as low power clock for bluetooth modem sleep. If this option is
  351. selected, bluetooth modem sleep can work under Dynamic Frequency Scaling(DFS) enabled, and
  352. bluetooth can work under light sleep enabled. Main crystal has a relatively better performance
  353. than other bluetooth low power clock sources.
  354. config BT_CTRL_LPCLK_SEL_EXT_32K_XTAL
  355. bool "External 32kHz crystal"
  356. depends on RTC_CLK_SRC_EXT_CRYS
  357. help
  358. External 32kHz crystal has a nominal frequency of 32.768kHz and provides good frequency
  359. stability. If used as Bluetooth low power clock, External 32kHz can support Bluetooth
  360. modem sleep to be used with both DFS and light sleep.
  361. config BT_CTRL_LPCLK_SEL_RTC_SLOW
  362. bool "Internal 150kHz RC oscillator"
  363. depends on RTC_CLK_SRC_INT_RC
  364. help
  365. Internal 150kHz RC oscillator. The accuracy of this clock is a lot larger than 500ppm which is required
  366. in Bluetooth communication, so don't select this option in scenarios such as BLE connection state.
  367. endchoice
  368. config BT_CTRL_MAIN_XTAL_PU_DURING_LIGHT_SLEEP
  369. bool "power up main XTAL during light sleep"
  370. depends on (BT_CTRL_LPCLK_SEL_MAIN_XTAL || BT_CTRL_LPCLK_SEL_EXT_32K_XTAL) && FREERTOS_USE_TICKLESS_IDLE
  371. default n
  372. help
  373. If this option is selected, the main crystal will power up during light sleep when the low power clock
  374. selects an external 32kHz crystal but the external 32kHz crystal does not exist or the low power clock
  375. selects the main crystal.
  376. endmenu
  377. config BT_CTRL_SLEEP_MODE_EFF
  378. int
  379. default 1 if BT_CTRL_MODEM_SLEEP_MODE_1
  380. default 0
  381. config BT_CTRL_SLEEP_CLOCK_EFF
  382. int
  383. default 1 if BT_CTRL_LPCLK_SEL_MAIN_XTAL
  384. default 2 if BT_CTRL_LPCLK_SEL_EXT_32K_XTAL
  385. default 3 if BT_CTRL_LPCLK_SEL_RTC_SLOW
  386. default 0
  387. config BT_CTRL_HCI_TL_EFF
  388. int
  389. default 0 if BT_CTRL_HCI_MODE_UART_H4
  390. default 1 if BT_CTRL_HCI_M0DE_VHCI
  391. default 1
  392. config BT_CTRL_AGC_RECORRECT_EN
  393. bool "Enable HW AGC recorrect"
  394. default n
  395. help
  396. Enable uncoded phy AGC recorrect
  397. config BT_CTRL_CODED_AGC_RECORRECT_EN
  398. bool "Enable coded phy AGC recorrect"
  399. depends on BT_CTRL_AGC_RECORRECT_EN
  400. default n
  401. help
  402. Enable coded phy AGC recorrect
  403. config BT_CTRL_SCAN_BACKOFF_UPPERLIMITMAX
  404. bool "Disable active scan backoff"
  405. default n
  406. help
  407. Disable active scan backoff. The bluetooth spec requires that scanners should run a backoff procedure to
  408. minimize collision of scan request PDUs from nultiple scanners. If scan backoff is disabled, in active
  409. scanning, scan request PDU will be sent every time when HW receives scannable ADV PDU.