Kconfig.in 14 KB

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