Kconfig.in 14 KB

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