Kconfig.in 14 KB

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