Kconfig.in 15 KB

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