Kconfig 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393
  1. menu "Wi-Fi"
  2. config ESP32_WIFI_SW_COEXIST_ENABLE
  3. bool "Software controls WiFi/Bluetooth coexistence"
  4. depends on BT_ENABLED
  5. default y
  6. help
  7. If enabled, WiFi & Bluetooth coexistence is controlled by software rather than hardware.
  8. Recommended for heavy traffic scenarios. Both coexistence configuration options are
  9. automatically managed, no user intervention is required.
  10. If only Bluetooth is used, it is recommended to disable this option to reduce binary file
  11. size.
  12. config ESP32_WIFI_STATIC_RX_BUFFER_NUM
  13. int "Max number of WiFi static RX buffers"
  14. range 2 25
  15. default 10 if !SPIRAM_TRY_ALLOCATE_WIFI_LWIP
  16. default 16 if SPIRAM_TRY_ALLOCATE_WIFI_LWIP
  17. help
  18. Set the number of WiFi static RX buffers. Each buffer takes approximately 1.6KB of RAM.
  19. The static rx buffers are allocated when esp_wifi_init is called, they are not freed
  20. until esp_wifi_deinit is called.
  21. WiFi hardware use these buffers to receive all 802.11 frames.
  22. A higher number may allow higher throughput but increases memory use. If ESP32_WIFI_AMPDU_RX_ENABLED
  23. is enabled, this value is recommended to set equal or bigger than ESP32_WIFI_RX_BA_WIN in order to
  24. achieve better throughput and compatibility with both stations and APs.
  25. config ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM
  26. int "Max number of WiFi dynamic RX buffers"
  27. range 0 128 if !LWIP_WND_SCALE
  28. range 0 1024 if LWIP_WND_SCALE
  29. default 32
  30. help
  31. Set the number of WiFi dynamic RX buffers, 0 means unlimited RX buffers will be allocated
  32. (provided sufficient free RAM). The size of each dynamic RX buffer depends on the size of
  33. the received data frame.
  34. For each received data frame, the WiFi driver makes a copy to an RX buffer and then delivers
  35. it to the high layer TCP/IP stack. The dynamic RX buffer is freed after the higher layer has
  36. successfully received the data frame.
  37. For some applications, WiFi data frames may be received faster than the application can
  38. process them. In these cases we may run out of memory if RX buffer number is unlimited (0).
  39. If a dynamic RX buffer limit is set, it should be at least the number of static RX buffers.
  40. choice ESP32_WIFI_TX_BUFFER
  41. prompt "Type of WiFi TX buffers"
  42. default ESP32_WIFI_DYNAMIC_TX_BUFFER
  43. help
  44. Select type of WiFi TX buffers:
  45. If "Static" is selected, WiFi TX buffers are allocated when WiFi is initialized and released
  46. when WiFi is de-initialized. The size of each static TX buffer is fixed to about 1.6KB.
  47. If "Dynamic" is selected, each WiFi TX buffer is allocated as needed when a data frame is
  48. delivered to the Wifi driver from the TCP/IP stack. The buffer is freed after the data frame
  49. has been sent by the WiFi driver. The size of each dynamic TX buffer depends on the length
  50. of each data frame sent by the TCP/IP layer.
  51. If PSRAM is enabled, "Static" should be selected to guarantee enough WiFi TX buffers.
  52. If PSRAM is disabled, "Dynamic" should be selected to improve the utilization of RAM.
  53. config ESP32_WIFI_STATIC_TX_BUFFER
  54. bool "Static"
  55. config ESP32_WIFI_DYNAMIC_TX_BUFFER
  56. bool "Dynamic"
  57. depends on !SPIRAM_USE_MALLOC
  58. endchoice
  59. config ESP32_WIFI_TX_BUFFER_TYPE
  60. int
  61. default 0 if ESP32_WIFI_STATIC_TX_BUFFER
  62. default 1 if ESP32_WIFI_DYNAMIC_TX_BUFFER
  63. config ESP32_WIFI_STATIC_TX_BUFFER_NUM
  64. int "Max number of WiFi static TX buffers"
  65. depends on ESP32_WIFI_STATIC_TX_BUFFER
  66. range 1 64
  67. default 16
  68. help
  69. Set the number of WiFi static TX buffers. Each buffer takes approximately 1.6KB of RAM.
  70. The static RX buffers are allocated when esp_wifi_init() is called, they are not released
  71. until esp_wifi_deinit() is called.
  72. For each transmitted data frame from the higher layer TCP/IP stack, the WiFi driver makes a
  73. copy of it in a TX buffer. For some applications especially UDP applications, the upper
  74. layer can deliver frames faster than WiFi layer can transmit. In these cases, we may run out
  75. of TX buffers.
  76. config ESP32_WIFI_CACHE_TX_BUFFER_NUM
  77. int "Max number of WiFi cache TX buffers"
  78. depends on (ESP32_SPIRAM_SUPPORT || ESP32S2_SPIRAM_SUPPORT)
  79. range 16 128
  80. default 32
  81. help
  82. Set the number of WiFi cache TX buffer number.
  83. For each TX packet from uplayer, such as LWIP etc, WiFi driver needs to allocate a static TX
  84. buffer and makes a copy of uplayer packet. If WiFi driver fails to allocate the static TX buffer,
  85. it caches the uplayer packets to a dedicated buffer queue, this option is used to configure the
  86. size of the cached TX queue.
  87. config ESP32_WIFI_DYNAMIC_TX_BUFFER_NUM
  88. int "Max number of WiFi dynamic TX buffers"
  89. depends on ESP32_WIFI_DYNAMIC_TX_BUFFER
  90. range 1 128
  91. default 32
  92. help
  93. Set the number of WiFi dynamic TX buffers. The size of each dynamic TX buffer is not fixed,
  94. it depends on the size of each transmitted data frame.
  95. For each transmitted frame from the higher layer TCP/IP stack, the WiFi driver makes a copy
  96. of it in a TX buffer. For some applications, especially UDP applications, the upper layer
  97. can deliver frames faster than WiFi layer can transmit. In these cases, we may run out of TX
  98. buffers.
  99. config ESP32_WIFI_CSI_ENABLED
  100. bool "WiFi CSI(Channel State Information)"
  101. default n
  102. help
  103. Select this option to enable CSI(Channel State Information) feature. CSI takes about
  104. CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM KB of RAM. If CSI is not used, it is better to disable
  105. this feature in order to save memory.
  106. config ESP32_WIFI_AMPDU_TX_ENABLED
  107. bool "WiFi AMPDU TX"
  108. default y
  109. help
  110. Select this option to enable AMPDU TX feature
  111. config ESP32_WIFI_TX_BA_WIN
  112. int "WiFi AMPDU TX BA window size"
  113. depends on ESP32_WIFI_AMPDU_TX_ENABLED
  114. range 2 32
  115. default 6
  116. help
  117. Set the size of WiFi Block Ack TX window. Generally a bigger value means higher throughput but
  118. more memory. Most of time we should NOT change the default value unless special reason, e.g.
  119. test the maximum UDP TX throughput with iperf etc. For iperf test in shieldbox, the recommended
  120. value is 9~12.
  121. config ESP32_WIFI_AMPDU_RX_ENABLED
  122. bool "WiFi AMPDU RX"
  123. default y
  124. help
  125. Select this option to enable AMPDU RX feature
  126. config ESP32_WIFI_RX_BA_WIN
  127. int "WiFi AMPDU RX BA window size"
  128. depends on ESP32_WIFI_AMPDU_RX_ENABLED
  129. range 2 32
  130. default 6 if !SPIRAM_TRY_ALLOCATE_WIFI_LWIP
  131. default 16 if SPIRAM_TRY_ALLOCATE_WIFI_LWIP
  132. help
  133. Set the size of WiFi Block Ack RX window. Generally a bigger value means higher throughput and better
  134. compatibility but more memory. Most of time we should NOT change the default value unless special
  135. reason, e.g. test the maximum UDP RX throughput with iperf etc. For iperf test in shieldbox, the
  136. recommended value is 9~12. If PSRAM is used and WiFi memory is prefered to allocat in PSRAM first,
  137. the default and minimum value should be 16 to achieve better throughput and compatibility with both
  138. stations and APs.
  139. config ESP32_WIFI_NVS_ENABLED
  140. bool "WiFi NVS flash"
  141. default y
  142. help
  143. Select this option to enable WiFi NVS flash
  144. choice ESP32_WIFI_TASK_CORE_ID
  145. depends on !FREERTOS_UNICORE
  146. prompt "WiFi Task Core ID"
  147. default ESP32_WIFI_TASK_PINNED_TO_CORE_0
  148. help
  149. Pinned WiFi task to core 0 or core 1.
  150. config ESP32_WIFI_TASK_PINNED_TO_CORE_0
  151. bool "Core 0"
  152. config ESP32_WIFI_TASK_PINNED_TO_CORE_1
  153. bool "Core 1"
  154. endchoice
  155. config ESP32_WIFI_SOFTAP_BEACON_MAX_LEN
  156. int "Max length of WiFi SoftAP Beacon"
  157. range 752 1256
  158. default 752
  159. help
  160. ESP-MESH utilizes beacon frames to detect and resolve root node conflicts (see documentation). However the
  161. default length of a beacon frame can simultaneously hold only five root node identifier structures,
  162. meaning that a root node conflict of up to five nodes can be detected at one time. In the occurence of
  163. more root nodes conflict involving more than five root nodes, the conflict resolution process will detect
  164. five of the root nodes, resolve the conflict, and re-detect more root nodes. This process will repeat
  165. until all root node conflicts are resolved. However this process can generally take a very long time.
  166. To counter this situation, the beacon frame length can be increased such that more root nodes can be
  167. detected simultaneously. Each additional root node will require 36 bytes and should be added ontop of the
  168. default beacon frame length of
  169. 752 bytes. For example, if you want to detect 10 root nodes simultaneously, you need to set the beacon
  170. frame length as
  171. 932 (752+36*5).
  172. Setting a longer beacon length also assists with debugging as the conflicting root nodes can be identified
  173. more quickly.
  174. config ESP32_WIFI_MGMT_SBUF_NUM
  175. int "WiFi mgmt short buffer number"
  176. range 6 32
  177. default 32
  178. help
  179. Set the number of WiFi management short buffer.
  180. config ESP32_WIFI_DEBUG_LOG_ENABLE
  181. bool "Enable WiFi debug log"
  182. default n
  183. help
  184. Select this option to enable WiFi debug log
  185. choice ESP32_WIFI_DEBUG_LOG_LEVEL
  186. depends on ESP32_WIFI_DEBUG_LOG_ENABLE
  187. prompt "WiFi debug log level"
  188. default ESP32_WIFI_DEBUG_LOG_DEBUG
  189. help
  190. The WiFi log is divided into the following levels: ERROR,WARNING,INFO,DEBUG,VERBOSE.
  191. The ERROR,WARNING,INFO levels are enabled by default, and the DEBUG,VERBOSE levels can be enabled here.
  192. config ESP32_WIFI_DEBUG_LOG_DEBUG
  193. bool "WiFi Debug Log Debug"
  194. config ESP32_WIFI_DEBUG_LOG_VERBOSE
  195. bool "WiFi Debug Log Verbose"
  196. endchoice
  197. choice ESP32_WIFI_DEBUG_LOG_MODULE
  198. depends on ESP32_WIFI_DEBUG_LOG_ENABLE
  199. prompt "WiFi debug log module"
  200. default ESP32_WIFI_DEBUG_LOG_MODULE_WIFI
  201. help
  202. The WiFi log module contains three parts: WIFI,COEX,MESH. The WIFI module indicates the logs related to
  203. WiFi, the COEX module indicates the logs related to WiFi and BT(or BLE) coexist, the MESH module indicates
  204. the logs related to Mesh. When ESP32_WIFI_LOG_MODULE_ALL is enabled, all modules are selected.
  205. config ESP32_WIFI_DEBUG_LOG_MODULE_ALL
  206. bool "WiFi Debug Log Module All"
  207. config ESP32_WIFI_DEBUG_LOG_MODULE_WIFI
  208. bool "WiFi Debug Log Module WiFi"
  209. config ESP32_WIFI_DEBUG_LOG_MODULE_COEX
  210. bool "WiFi Debug Log Module Coex"
  211. config ESP32_WIFI_DEBUG_LOG_MODULE_MESH
  212. bool "WiFi Debug Log Module Mesh"
  213. endchoice
  214. config ESP32_WIFI_DEBUG_LOG_SUBMODULE
  215. depends on ESP32_WIFI_DEBUG_LOG_ENABLE
  216. bool "WiFi debug log submodule"
  217. default n
  218. help
  219. Enable this option to set the WiFi debug log submodule.
  220. Currently the log submodule contains the following parts: INIT,IOCTL,CONN,SCAN.
  221. The INIT submodule indicates the initialization process.The IOCTL submodule indicates the API calling
  222. process.
  223. The CONN submodule indicates the connecting process.The SCAN submodule indicates the scaning process.
  224. config ESP32_WIFI_DEBUG_LOG_SUBMODULE_ALL
  225. depends on ESP32_WIFI_DEBUG_LOG_SUBMODULE
  226. bool "WiFi Debug Log Submodule All"
  227. default n
  228. help
  229. When this option is enabled, all debug submodules are selected.
  230. config ESP32_WIFI_DEBUG_LOG_SUBMODULE_INIT
  231. depends on ESP32_WIFI_DEBUG_LOG_SUBMODULE && (!ESP32_WIFI_DEBUG_LOG_SUBMODULE_ALL)
  232. bool "WiFi Debug Log Submodule Init"
  233. default n
  234. config ESP32_WIFI_DEBUG_LOG_SUBMODULE_IOCTL
  235. depends on ESP32_WIFI_DEBUG_LOG_SUBMODULE && (!ESP32_WIFI_DEBUG_LOG_SUBMODULE_ALL)
  236. bool "WiFi Debug Log Submodule Ioctl"
  237. default n
  238. config ESP32_WIFI_DEBUG_LOG_SUBMODULE_CONN
  239. depends on ESP32_WIFI_DEBUG_LOG_SUBMODULE && (!ESP32_WIFI_DEBUG_LOG_SUBMODULE_ALL)
  240. bool "WiFi Debug Log Submodule Conn"
  241. default n
  242. config ESP32_WIFI_DEBUG_LOG_SUBMODULE_SCAN
  243. depends on ESP32_WIFI_DEBUG_LOG_SUBMODULE && (!ESP32_WIFI_DEBUG_LOG_SUBMODULE_ALL)
  244. bool "WiFi Debug Log Submodule Scan"
  245. default n
  246. config ESP32_WIFI_IRAM_OPT
  247. bool "WiFi IRAM speed optimization"
  248. default n if (BT_ENABLED && ESP32_SPIRAM_SUPPORT)
  249. default y
  250. help
  251. Select this option to place frequently called Wi-Fi library functions in IRAM.
  252. When this option is disabled, more than 10Kbytes of IRAM memory will be saved
  253. but Wi-Fi throughput will be reduced.
  254. config ESP32_WIFI_RX_IRAM_OPT
  255. bool "WiFi RX IRAM speed optimization"
  256. default n if (BT_ENABLED && ESP32_SPIRAM_SUPPORT)
  257. default y
  258. help
  259. Select this option to place frequently called Wi-Fi library RX functions in IRAM.
  260. When this option is disabled, more than 17Kbytes of IRAM memory will be saved
  261. but Wi-Fi performance will be reduced.
  262. config ESP32_WIFI_ENABLE_WPA3_SAE
  263. bool "Enable WPA3-Personal"
  264. default y
  265. help
  266. Select this option to allow the device to establish a WPA3-Personal connection with eligible AP's.
  267. PMF (Protected Management Frames) is a prerequisite feature for a WPA3 connection, it needs to be
  268. explicitly configured before attempting connection. Please refer to the Wi-Fi Driver API Guide for details.
  269. endmenu # Wi-Fi
  270. menu "PHY"
  271. config ESP32_PHY_CALIBRATION_AND_DATA_STORAGE
  272. # ToDo: remove target dependency once NVS and PHY partial calibration are supported
  273. # also re-enable the <RF_calibration> entry in docs/../api-guides/index.rst
  274. depends on IDF_TARGET_ESP32
  275. bool "Store phy calibration data in NVS"
  276. default y
  277. help
  278. If this option is enabled, NVS will be initialized and calibration data will be loaded from there.
  279. PHY calibration will be skipped on deep sleep wakeup. If calibration data is not found, full calibration
  280. will be performed and stored in NVS. Normally, only partial calibration will be performed.
  281. If this option is disabled, full calibration will be performed.
  282. If it's easy that your board calibrate bad data, choose 'n'.
  283. Two cases for example, you should choose 'n':
  284. 1.If your board is easy to be booted up with antenna disconnected.
  285. 2.Because of your board design, each time when you do calibration, the result are too unstable.
  286. If unsure, choose 'y'.
  287. menuconfig ESP32_PHY_INIT_DATA_IN_PARTITION
  288. bool "Use a partition to store PHY init data"
  289. default n
  290. help
  291. If enabled, PHY init data will be loaded from a partition.
  292. When using a custom partition table, make sure that PHY data
  293. partition is included (type: 'data', subtype: 'phy').
  294. With default partition tables, this is done automatically.
  295. If PHY init data is stored in a partition, it has to be flashed there,
  296. otherwise runtime error will occur.
  297. If this option is not enabled, PHY init data will be embedded
  298. into the application binary.
  299. If unsure, choose 'n'.
  300. if ESP32_PHY_INIT_DATA_IN_PARTITION
  301. config ESP32_SUPPORT_MULTIPLE_PHY_INIT_DATA_BIN
  302. bool "Support multiple PHY init data bin"
  303. depends on ESP32_PHY_INIT_DATA_IN_PARTITION
  304. default n
  305. help
  306. If enabled, the corresponding PHY init data type can be automatically switched
  307. according to the country code. China's PHY init data bin is used by default.
  308. Can be modified by country information in API esp_wifi_set_country().
  309. The priority of switching the PHY init data type is:
  310. 1. Country configured by API esp_wifi_set_country()
  311. and the parameter policy is WIFI_COUNTRY_POLICY_MANUAL.
  312. 2. Country notified by the connected AP.
  313. 3. Country configured by API esp_wifi_set_country()
  314. and the parameter policy is WIFI_COUNTRY_POLICY_AUTO.
  315. config ESP32_PHY_INIT_DATA_ERROR
  316. bool "Terminate operation when PHY init data error"
  317. depends on ESP32_SUPPORT_MULTIPLE_PHY_INIT_DATA_BIN
  318. default n
  319. help
  320. If enabled, when an error occurs while the PHY init data is updated,
  321. the program will terminate and restart.
  322. If not enabled, the PHY init data will not be updated when an error occurs.
  323. endif
  324. config ESP32_PHY_MAX_WIFI_TX_POWER
  325. int "Max WiFi TX power (dBm)"
  326. range 10 20
  327. default 20
  328. help
  329. Set maximum transmit power for WiFi radio. Actual transmit power for high
  330. data rates may be lower than this setting.
  331. config ESP32_PHY_MAX_TX_POWER
  332. int
  333. default ESP32_PHY_MAX_WIFI_TX_POWER
  334. endmenu # PHY