Kconfig 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539
  1. menuconfig RT_USING_ESP_HOSTED
  2. bool "Using esp-hosted for espressif"
  3. select RT_USING_WIFI
  4. select RT_USING_SAL
  5. select RT_USING_SPI
  6. default n
  7. if RT_USING_ESP_HOSTED
  8. menu "ESP-Hosted Configure"
  9. choice
  10. prompt "Select the transport interface"
  11. default ESP_HOSTED_SPI_HOST_INTERFACE
  12. config ESP_HOSTED_SPI_HOST_INTERFACE
  13. bool "SPI"
  14. # config ESP_HOSTED_SDIO_HOST_INTERFACE
  15. # bool "SDIO"
  16. endchoice
  17. choice
  18. prompt "Slave chipset to be used"
  19. default ESP_HOSTED_SLAVE_CHIPSET_ESP32
  20. config ESP_HOSTED_SLAVE_CHIPSET_ESP32
  21. depends on ESP_HOSTED_SPI_HOST_INTERFACE || ESP_HOSTED_SDIO_HOST_INTERFACE
  22. bool "Slave as ESP32"
  23. config ESP_HOSTED_SLAVE_CHIPSET_ESP32S2
  24. depends on ESP_HOSTED_SPI_HOST_INTERFACE
  25. bool "Slave as ESP32S2"
  26. config ESP_HOSTED_SLAVE_CHIPSET_ESP32S3
  27. depends on ESP_HOSTED_SPI_HOST_INTERFACE
  28. bool "Slave as ESP32S3"
  29. config ESP_HOSTED_SLAVE_CHIPSET_ESP32C2
  30. depends on ESP_HOSTED_SPI_HOST_INTERFACE
  31. bool "Slave as ESP32C2"
  32. config ESP_HOSTED_SLAVE_CHIPSET_ESP32C3
  33. depends on ESP_HOSTED_SPI_HOST_INTERFACE
  34. bool "Slave as ESP32C3"
  35. config ESP_HOSTED_SLAVE_CHIPSET_ESP32C6
  36. depends on ESP_HOSTED_SPI_HOST_INTERFACE || ESP_HOSTED_SDIO_HOST_INTERFACE
  37. bool "Slave as ESP32C6"
  38. endchoice
  39. menuconfig ESP_HOSTED_RAW_THROUGHPUT_TRANSPORT
  40. bool "Enable raw throughput transport"
  41. default n
  42. help
  43. Find max transport performance which helps to assess stability of porting done
  44. if ESP_HOSTED_RAW_THROUGHPUT_TRANSPORT
  45. choice
  46. prompt "Select raw throughput direction"
  47. default ESP_HOSTED_RAW_THROUGHPUT_TX_TO_SLAVE
  48. config ESP_HOSTED_RAW_THROUGHPUT_TX_TO_SLAVE
  49. bool "TX to slave"
  50. config ESP_HOSTED_RAW_THROUGHPUT_RX_FROM_SLAVE
  51. bool "RX from slave"
  52. config ESP_HOSTED_RAW_THROUGHPUT_BIDIRECTIONAL
  53. bool "Bidirectional"
  54. endchoice
  55. config ESP_HOSTED_RAW_TP_REPORT_INTERVAL
  56. int "The report interval of raw throughput in sec"
  57. default 10
  58. config ESP_HOSTED_RAW_TP_HOST_TO_ESP_PKT_LEN
  59. int "The length of the data to be sent in raw throughput"
  60. range 1 1500
  61. default 1460
  62. endif
  63. config ESP_HOSTED_PKT_STATS
  64. bool "Enable Transport level packet statistics"
  65. default n
  66. help
  67. On comparing with slave packet stats helps to understand any packet loss at hosted
  68. config ESP_HOSTED_MAX_SIMULTANEOUS_SYNC_RPC_REQUESTS
  69. int "The maximum number of simultaneous sync rpc requests"
  70. range 1 20
  71. default 8
  72. config ESP_HOSTED_MAX_SIMULTANEOUS_ASYNC_RPC_REQUESTS
  73. int "The maximum number of simultaneous async rpc requests"
  74. range 1 20
  75. default 8
  76. config ESP_HOSTED_RPC_THREAD_PRIORITY
  77. int "The priority of the esp-hosted rpc thread"
  78. range 0 32
  79. default 20
  80. config ESP_HOSTED_RPC_THREAD_STACK_SIZE
  81. int "The stack size of the esp-hosted rpc thread"
  82. range 0 8192
  83. default 5120
  84. config ESP_HOSTED_TRANSPORT_THREAD_PRIORITY
  85. int "The priority of the esp-hosted transport thread"
  86. range 0 32
  87. default 20
  88. config ESP_HOSTED_TRANSPORT_THREAD_STACK_SIZE
  89. int "The stack size of the esp-hosted SPI thread"
  90. range 0 4096
  91. default 1024
  92. config ESP_HOSTED_TRANSPORT_QUEUE_NUMBER
  93. int "The number for esp-hosted SPI queue"
  94. range 0 32
  95. default 8
  96. config ESP_HOSTED_SPI_DEVICE_NAME
  97. string "Set the spi device name"
  98. default "esp-hosted"
  99. depends on ESP_HOSTED_SPI_HOST_INTERFACE
  100. config ESP_HOSTED_SPI_BUS_NAME
  101. string "Set the spi bus name"
  102. default "spi1"
  103. depends on ESP_HOSTED_SPI_HOST_INTERFACE
  104. choice
  105. prompt "Set the spi mode"
  106. default ESP_HOSTED_SPI_MODE_3
  107. config ESP_HOSTED_SPI_MODE_0
  108. bool "Mode 0"
  109. config ESP_HOSTED_SPI_MODE_1
  110. bool "Mode 1"
  111. config ESP_HOSTED_SPI_MODE_2
  112. bool "Mode 2"
  113. config ESP_HOSTED_SPI_MODE_3
  114. bool "Mode 3"
  115. endchoice
  116. config ESP_HOSTED_SPI_MAX_HZ
  117. int "Set the maximum spi frequency(Hz)"
  118. default 30000000
  119. depends on ESP_HOSTED_SPI_HOST_INTERFACE
  120. choice
  121. prompt "Select the pin name or number"
  122. default ESP_HOSTED_USING_PIN_NAME
  123. config ESP_HOSTED_USING_PIN_NAME
  124. bool "Name"
  125. config ESP_HOSTED_USING_PIN_NUMBER
  126. bool "Number"
  127. endchoice
  128. if ESP_HOSTED_USING_PIN_NAME
  129. config ESP_HOSTED_SPI_CS_PIN_NAME
  130. string "Set the SPI CS pin name"
  131. default "PA.0"
  132. depends on ESP_HOSTED_SPI_HOST_INTERFACE
  133. config ESP_HOSTED_DATA_READY_PIN_NAME
  134. string "Set the data ready pin name"
  135. default "PA.0"
  136. depends on ESP_HOSTED_SPI_HOST_INTERFACE
  137. config ESP_HOSTED_HANDSHAKE_PIN_NAME
  138. string "Set the handshake pin name"
  139. default "PA.0"
  140. depends on ESP_HOSTED_SPI_HOST_INTERFACE
  141. config ESP_HOSTED_RESET_PIN_NAME
  142. string "Set the reset pin name"
  143. default "PA.0"
  144. endif
  145. if ESP_HOSTED_USING_PIN_NUMBER
  146. config ESP_HOSTED_SPI_CS_PIN
  147. int "Set the SPI CS pin"
  148. default -1
  149. depends on ESP_HOSTED_SPI_HOST_INTERFACE
  150. config ESP_HOSTED_DATA_READY_PIN
  151. int "Set the data ready pin"
  152. default -1
  153. config ESP_HOSTED_HANDSHAKE_PIN
  154. int "Set the handshake pin"
  155. default -1
  156. config ESP_HOSTED_RESET_PIN
  157. int "Set the reset pin"
  158. default -1
  159. endif
  160. config ESP_HOSTED_THREAD_INIT
  161. bool "Use thread initialization"
  162. default y
  163. if ESP_HOSTED_THREAD_INIT
  164. config ESP_HOSTED_INIT_THREAD_STACK_SIZE
  165. int "The stack size of the init thread"
  166. range 0 4096
  167. default 2048
  168. config ESP_HOSTED_INIT_THREAD_PRIORITY
  169. int "The priority of the init thread"
  170. range 0 32
  171. default 20
  172. endif
  173. endmenu # ESP-Hosted Configure
  174. menuconfig ESP_HOSTED_BT_ENABLED
  175. bool "Enable Bluetooth"
  176. default n
  177. if ESP_HOSTED_BT_ENABLED
  178. choice
  179. prompt "Select hci interface"
  180. default ESP_HOSTED_BT_USING_VHCI_DEVICE_DRIVER
  181. config ESP_HOSTED_BT_USING_VHCI_DEVICE_DRIVER
  182. bool "Using vhci device drivers"
  183. config ESP_HOSTED_BT_USING_NIMBLE_STACK
  184. bool "Using NimBLE hci drivers"
  185. endchoice
  186. if ESP_HOSTED_BT_USING_VHCI_DEVICE_DRIVER
  187. config ESP_HOSTED_VHCI_DEVICE_NAME
  188. string "The vhci device name"
  189. default "vhci"
  190. config ESP_HOSTED_VHCI_DEVICE_BUF_SIZE
  191. int "The vhci device buffer size"
  192. default 512
  193. endif
  194. endif
  195. menu "Wi-Fi Configure"
  196. config SOC_WIFI_HE_SUPPORT
  197. bool
  198. default y if ESP_HOSTED_SLAVE_CHIPSET_ESP32C6
  199. config SOC_WIFI_HE_SUPPORT_5G
  200. bool
  201. default y if ESP_HOSTED_SLAVE_CHIPSET_ESP32C5
  202. config SOC_WIFI_CSI_SUPPORT
  203. bool
  204. default y if ESP_HOSTED_SLAVE_CHIPSET_ESP32
  205. default y if ESP_HOSTED_SLAVE_CHIPSET_ESP32C3
  206. default y if ESP_HOSTED_SLAVE_CHIPSET_ESP32C5
  207. default y if ESP_HOSTED_SLAVE_CHIPSET_ESP32C6
  208. default y if ESP_HOSTED_SLAVE_CHIPSET_ESP32S2
  209. default y if ESP_HOSTED_SLAVE_CHIPSET_ESP32S3
  210. config SOC_WIFI_FTM_SUPPORT
  211. bool
  212. default y if ESP_HOSTED_SLAVE_CHIPSET_ESP32C2
  213. default y if ESP_HOSTED_SLAVE_CHIPSET_ESP32C3
  214. default y if ESP_HOSTED_SLAVE_CHIPSET_ESP32C6
  215. default y if ESP_HOSTED_SLAVE_CHIPSET_ESP32S2
  216. default y if ESP_HOSTED_SLAVE_CHIPSET_ESP32S3
  217. config SOC_WIFI_GCMP_SUPPORT
  218. bool
  219. default y if ESP_HOSTED_SLAVE_CHIPSET_ESP32C3
  220. default y if ESP_HOSTED_SLAVE_CHIPSET_ESP32C5
  221. default y if ESP_HOSTED_SLAVE_CHIPSET_ESP32C6
  222. default y if ESP_HOSTED_SLAVE_CHIPSET_ESP32S3
  223. config ESP_WIFI_STATIC_RX_BUFFER_NUM
  224. int "Max number of WiFi static RX buffers"
  225. range 2 25 if !SOC_WIFI_HE_SUPPORT
  226. range 2 128 if SOC_WIFI_HE_SUPPORT
  227. default 10
  228. help
  229. Set the number of WiFi static RX buffers. Each buffer takes approximately 1.6KB of RAM.
  230. The static rx buffers are allocated when esp_wifi_init is called, they are not freed
  231. until esp_wifi_deinit is called.
  232. WiFi hardware use these buffers to receive all 802.11 frames.
  233. A higher number may allow higher throughput but increases memory use. If ESP_WIFI_AMPDU_RX_ENABLED
  234. is enabled, this value is recommended to set equal or bigger than ESP_WIFI_RX_BA_WIN in order to
  235. achieve better throughput and compatibility with both stations and APs.
  236. config ESP_WIFI_DYNAMIC_RX_BUFFER_NUM
  237. int "Max number of WiFi dynamic RX buffers"
  238. range 0 128 if !LWIP_WND_SCALE
  239. range 0 1024 if LWIP_WND_SCALE
  240. default 32
  241. help
  242. Set the number of WiFi dynamic RX buffers, 0 means unlimited RX buffers will be allocated
  243. (provided sufficient free RAM). The size of each dynamic RX buffer depends on the size of
  244. the received data frame.
  245. For each received data frame, the WiFi driver makes a copy to an RX buffer and then delivers
  246. it to the high layer TCP/IP stack. The dynamic RX buffer is freed after the higher layer has
  247. successfully received the data frame.
  248. For some applications, WiFi data frames may be received faster than the application can
  249. process them. In these cases we may run out of memory if RX buffer number is unlimited (0).
  250. If a dynamic RX buffer limit is set, it should be at least the number of static RX buffers.
  251. choice ESP_WIFI_TX_BUFFER
  252. prompt "Type of WiFi TX buffers"
  253. default ESP_WIFI_DYNAMIC_TX_BUFFER
  254. help
  255. Select type of WiFi TX buffers:
  256. If "Static" is selected, WiFi TX buffers are allocated when WiFi is initialized and released
  257. when WiFi is de-initialized. The size of each static TX buffer is fixed to about 1.6KB.
  258. If "Dynamic" is selected, each WiFi TX buffer is allocated as needed when a data frame is
  259. delivered to the Wifi driver from the TCP/IP stack. The buffer is freed after the data frame
  260. has been sent by the WiFi driver. The size of each dynamic TX buffer depends on the length
  261. of each data frame sent by the TCP/IP layer.
  262. If PSRAM is enabled, "Static" should be selected to guarantee enough WiFi TX buffers.
  263. If PSRAM is disabled, "Dynamic" should be selected to improve the utilization of RAM.
  264. config ESP_WIFI_STATIC_TX_BUFFER
  265. bool "Static"
  266. config ESP_WIFI_DYNAMIC_TX_BUFFER
  267. bool "Dynamic"
  268. endchoice
  269. config ESP_WIFI_TX_BUFFER_TYPE
  270. int
  271. default 0 if ESP_WIFI_STATIC_TX_BUFFER
  272. default 1 if ESP_WIFI_DYNAMIC_TX_BUFFER
  273. config ESP_WIFI_STATIC_TX_BUFFER_NUM
  274. int "Max number of WiFi static TX buffers"
  275. depends on ESP_WIFI_STATIC_TX_BUFFER
  276. range 1 64
  277. default 16
  278. help
  279. Set the number of WiFi static TX buffers. Each buffer takes approximately 1.6KB of RAM.
  280. The static RX buffers are allocated when esp_wifi_init() is called, they are not released
  281. until esp_wifi_deinit() is called.
  282. For each transmitted data frame from the higher layer TCP/IP stack, the WiFi driver makes a
  283. copy of it in a TX buffer. For some applications especially UDP applications, the upper
  284. layer can deliver frames faster than WiFi layer can transmit. In these cases, we may run out
  285. of TX buffers.
  286. config ESP_WIFI_CACHE_TX_BUFFER_NUM
  287. int "Max number of WiFi cache TX buffers"
  288. range 16 128
  289. default 0
  290. help
  291. Set the number of WiFi cache TX buffer number.
  292. For each TX packet from uplayer, such as LWIP etc, WiFi driver needs to allocate a static TX
  293. buffer and makes a copy of uplayer packet. If WiFi driver fails to allocate the static TX buffer,
  294. it caches the uplayer packets to a dedicated buffer queue, this option is used to configure the
  295. size of the cached TX queue.
  296. config ESP_WIFI_DYNAMIC_TX_BUFFER_NUM
  297. int "Max number of WiFi dynamic TX buffers"
  298. depends on ESP_WIFI_DYNAMIC_TX_BUFFER
  299. range 1 128
  300. default 32
  301. help
  302. Set the number of WiFi dynamic TX buffers. The size of each dynamic TX buffer is not fixed,
  303. it depends on the size of each transmitted data frame.
  304. For each transmitted frame from the higher layer TCP/IP stack, the WiFi driver makes a copy
  305. of it in a TX buffer. For some applications, especially UDP applications, the upper layer
  306. can deliver frames faster than WiFi layer can transmit. In these cases, we may run out of TX
  307. buffers.
  308. config ESP_WIFI_CSI_ENABLED
  309. bool "WiFi CSI(Channel State Information)"
  310. depends on SOC_WIFI_CSI_SUPPORT
  311. default n
  312. help
  313. Select this option to enable CSI(Channel State Information) feature. CSI takes about
  314. ESP_WIFI_STATIC_RX_BUFFER_NUM KB of RAM. If CSI is not used, it is better to disable
  315. this feature in order to save memory.
  316. config ESP_WIFI_AMPDU_TX_ENABLED
  317. bool "WiFi AMPDU TX"
  318. default y
  319. help
  320. Select this option to enable AMPDU TX feature
  321. config ESP_WIFI_TX_BA_WIN
  322. int "WiFi AMPDU TX BA window size"
  323. depends on ESP_WIFI_AMPDU_TX_ENABLED
  324. range 2 32 if !SOC_WIFI_HE_SUPPORT
  325. range 2 64 if SOC_WIFI_HE_SUPPORT
  326. default 6
  327. help
  328. Set the size of WiFi Block Ack TX window. Generally a bigger value means higher throughput but
  329. more memory. Most of time we should NOT change the default value unless special reason, e.g.
  330. test the maximum UDP TX throughput with iperf etc. For iperf test in shieldbox, the recommended
  331. value is 9~12.
  332. config ESP_WIFI_AMPDU_RX_ENABLED
  333. bool "WiFi AMPDU RX"
  334. default y
  335. help
  336. Select this option to enable AMPDU RX feature
  337. config ESP_WIFI_RX_BA_WIN
  338. int "WiFi AMPDU RX BA window size"
  339. depends on ESP_WIFI_AMPDU_RX_ENABLED
  340. range 2 32 if !SOC_WIFI_HE_SUPPORT
  341. range 2 64 if SOC_WIFI_HE_SUPPORT
  342. default 6
  343. help
  344. Set the size of WiFi Block Ack RX window. Generally a bigger value means higher throughput and better
  345. compatibility but more memory. Most of time we should NOT change the default value unless special
  346. reason, e.g. test the maximum UDP RX throughput with iperf etc. For iperf test in shieldbox, the
  347. recommended value is 9~12. If PSRAM is used and WiFi memory is prefered to allocat in PSRAM first,
  348. the default and minimum value should be 16 to achieve better throughput and compatibility with both
  349. stations and APs.
  350. config ESP_WIFI_AMSDU_TX_ENABLED
  351. bool "WiFi AMSDU TX"
  352. depends on SPIRAM
  353. default n
  354. help
  355. Select this option to enable AMSDU TX feature
  356. config ESP_WIFI_SOFTAP_BEACON_MAX_LEN
  357. int "Max length of WiFi SoftAP Beacon"
  358. range 752 1256
  359. default 752
  360. help
  361. ESP-MESH utilizes beacon frames to detect and resolve root node conflicts (see documentation). However the
  362. default length of a beacon frame can simultaneously hold only five root node identifier structures,
  363. meaning that a root node conflict of up to five nodes can be detected at one time. In the occurence of
  364. more root nodes conflict involving more than five root nodes, the conflict resolution process will detect
  365. five of the root nodes, resolve the conflict, and re-detect more root nodes. This process will repeat
  366. until all root node conflicts are resolved. However this process can generally take a very long time.
  367. To counter this situation, the beacon frame length can be increased such that more root nodes can be
  368. detected simultaneously. Each additional root node will require 36 bytes and should be added ontop of the
  369. default beacon frame length of
  370. 752 bytes. For example, if you want to detect 10 root nodes simultaneously, you need to set the beacon
  371. frame length as
  372. 932 (752+36*5).
  373. Setting a longer beacon length also assists with debugging as the conflicting root nodes can be identified
  374. more quickly.
  375. config ESP_WIFI_MGMT_SBUF_NUM
  376. int "WiFi mgmt short buffer number"
  377. range 6 32
  378. default 32
  379. help
  380. Set the number of WiFi management short buffer.
  381. config ESP_WIFI_ENABLE_WPA3_SAE
  382. bool "Enable WPA3-Personal"
  383. default y
  384. help
  385. Select this option to allow the device to establish a WPA3-Personal connection with eligible AP's.
  386. PMF (Protected Management Frames) is a prerequisite feature for a WPA3 connection, it needs to be
  387. explicitly configured before attempting connection. Please refer to the Wi-Fi Driver API Guide for details.
  388. config ESP_WIFI_FTM_ENABLE
  389. bool "WiFi FTM"
  390. default n
  391. depends on SOC_WIFI_FTM_SUPPORT
  392. help
  393. Enable feature Fine Timing Measurement for calculating WiFi Round-Trip-Time (RTT).
  394. config ESP_WIFI_FTM_INITIATOR_SUPPORT
  395. bool "FTM Initiator support"
  396. default y
  397. depends on ESP_WIFI_FTM_ENABLE
  398. config ESP_WIFI_FTM_RESPONDER_SUPPORT
  399. bool "FTM Responder support"
  400. default y
  401. depends on ESP_WIFI_FTM_ENABLE
  402. config ESP_WIFI_STA_DISCONNECTED_PM_ENABLE
  403. bool "Power Management for station at disconnected"
  404. default y
  405. help
  406. Select this option to enable power_management for station when disconnected.
  407. Chip will do modem-sleep when rf module is not in use any more.
  408. config ESP_WIFI_GCMP_SUPPORT
  409. bool "WiFi GCMP Support(GCMP128 and GCMP256)"
  410. default n
  411. depends on SOC_WIFI_GCMP_SUPPORT
  412. help
  413. Select this option to enable GCMP support. GCMP support is compulsory for WiFi Suite-B support.
  414. config ESP_WIFI_GMAC_SUPPORT
  415. bool "WiFi GMAC Support(GMAC128 and GMAC256)"
  416. default n
  417. help
  418. Select this option to enable GMAC support. GMAC support is compulsory for WiFi 192 bit certification.
  419. config ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM
  420. int "Maximum espnow encrypt peers number"
  421. range 0 4 if ESP_HOSTED_SLAVE_CHIPSET_ESP32C2
  422. range 0 17 if (!ESP_HOSTED_SLAVE_CHIPSET_ESP32C2)
  423. default 2 if ESP_HOSTED_SLAVE_CHIPSET_ESP32C2
  424. default 7 if (!ESP_HOSTED_SLAVE_CHIPSET_ESP32C2)
  425. help
  426. Maximum number of encrypted peers supported by espnow.
  427. The number of hardware keys for encryption is fixed. And the espnow and SoftAP share the same
  428. hardware keys. So this configuration will affect the maximum connection number of SoftAP.
  429. Maximum espnow encrypted peers number + maximum number of connections of SoftAP = Max hardware keys number.
  430. When using ESP mesh, this value should be set to a maximum of 6.
  431. config ESP_WIFI_11R_SUPPORT
  432. bool "Enable 802.11R (Fast Transition) Support"
  433. default n
  434. help
  435. Select this option to enable WiFi Fast Transition Support.
  436. endmenu # Wi-Fi Configure
  437. endif