Kconfig 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449
  1. menu "Driver Configurations"
  2. menu "Legacy ADC Configuration"
  3. config ADC_DISABLE_DAC
  4. depends on SOC_DAC_SUPPORTED
  5. bool "Disable DAC when ADC2 is used on GPIO 25 and 26"
  6. default y
  7. help
  8. If this is set, the ADC2 driver will disable the output of the DAC corresponding to the specified
  9. channel. This is the default value.
  10. For testing, disable this option so that we can measure the output of DAC by internal ADC.
  11. config ADC_SUPPRESS_DEPRECATE_WARN
  12. bool "Suppress legacy driver deprecated warning"
  13. default n
  14. help
  15. Wether to suppress the deprecation warnings when using legacy adc driver (driver/adc.h).
  16. If you want to continue using the legacy driver, and don't want to see related deprecation warnings,
  17. you can enable this option.
  18. menu "Legacy ADC Calibration Configuration"
  19. config ADC_CAL_EFUSE_TP_ENABLE
  20. depends on IDF_TARGET_ESP32
  21. bool "Use Two Point Values"
  22. default "y"
  23. help
  24. Some ESP32s have Two Point calibration values burned into eFuse BLOCK3.
  25. This option will allow the ADC calibration component to characterize the
  26. ADC-Voltage curve using Two Point values if they are available.
  27. config ADC_CAL_EFUSE_VREF_ENABLE
  28. depends on IDF_TARGET_ESP32
  29. bool "Use eFuse Vref"
  30. default "y"
  31. help
  32. Some ESP32s have Vref burned into eFuse BLOCK0. This option will allow
  33. the ADC calibration component to characterize the ADC-Voltage curve using
  34. eFuse Vref if it is available.
  35. config ADC_CAL_LUT_ENABLE
  36. depends on IDF_TARGET_ESP32
  37. bool "Use Lookup Tables"
  38. default "y"
  39. help
  40. This option will allow the ADC calibration component to use Lookup Tables
  41. to correct for non-linear behavior in 11db attenuation. Other attenuations
  42. do not exhibit non-linear behavior hence will not be affected by this option.
  43. config ADC_CALI_SUPPRESS_DEPRECATE_WARN
  44. bool "Suppress legacy driver deprecated warning"
  45. default n
  46. help
  47. Wether to suppress the deprecation warnings when using legacy adc calibration
  48. driver (esp_adc_cal.h).
  49. If you want to continue using the legacy driver, and don't want to see related
  50. deprecation warnings, you can enable this option.
  51. endmenu
  52. endmenu # ADC Configuration
  53. menu "SPI Configuration"
  54. config SPI_MASTER_IN_IRAM
  55. bool "Place transmitting functions of SPI master into IRAM"
  56. default n
  57. select SPI_MASTER_ISR_IN_IRAM
  58. help
  59. Normally only the ISR of SPI master is placed in the IRAM, so that it
  60. can work without the flash when interrupt is triggered.
  61. For other functions, there's some possibility that the flash cache
  62. miss when running inside and out of SPI functions, which may increase
  63. the interval of SPI transactions.
  64. Enable this to put ``queue_trans``, ``get_trans_result`` and
  65. ``transmit`` functions into the IRAM to avoid possible cache miss.
  66. During unit test, this is enabled to measure the ideal case of api.
  67. config SPI_MASTER_ISR_IN_IRAM
  68. bool "Place SPI master ISR function into IRAM"
  69. default y
  70. help
  71. Place the SPI master ISR in to IRAM to avoid possible cache miss.
  72. Also you can forbid the ISR being disabled during flash writing
  73. access, by add ESP_INTR_FLAG_IRAM when initializing the driver.
  74. config SPI_SLAVE_IN_IRAM
  75. bool "Place transmitting functions of SPI slave into IRAM"
  76. default n
  77. select SPI_SLAVE_ISR_IN_IRAM
  78. help
  79. Normally only the ISR of SPI slave is placed in the IRAM, so that it
  80. can work without the flash when interrupt is triggered.
  81. For other functions, there's some possibility that the flash cache
  82. miss when running inside and out of SPI functions, which may increase
  83. the interval of SPI transactions.
  84. Enable this to put ``queue_trans``, ``get_trans_result`` and
  85. ``transmit`` functions into the IRAM to avoid possible cache miss.
  86. config SPI_SLAVE_ISR_IN_IRAM
  87. bool "Place SPI slave ISR function into IRAM"
  88. default y
  89. select PERIPH_CTRL_FUNC_IN_IRAM
  90. help
  91. Place the SPI slave ISR in to IRAM to avoid possible cache miss.
  92. Also you can forbid the ISR being disabled during flash writing
  93. access, by add ESP_INTR_FLAG_IRAM when initializing the driver.
  94. endmenu # SPI Configuration
  95. menu "TWAI Configuration"
  96. depends on SOC_TWAI_SUPPORTED
  97. config TWAI_ISR_IN_IRAM
  98. bool "Place TWAI ISR function into IRAM"
  99. default n
  100. select PERIPH_CTRL_FUNC_IN_IRAM if TWAI_ERRATA_FIX_RX_FRAME_INVALID || TWAI_ERRATA_FIX_RX_FIFO_CORRUPT
  101. help
  102. Place the TWAI ISR in to IRAM. This will allow the ISR to avoid
  103. cache misses, and also be able to run whilst the cache is disabled
  104. (such as when writing to SPI Flash).
  105. Note that if this option is enabled:
  106. - Users should also set the ESP_INTR_FLAG_IRAM in the driver
  107. configuration structure when installing the driver (see docs for
  108. specifics).
  109. - Alert logging (i.e., setting of the TWAI_ALERT_AND_LOG flag)
  110. will have no effect.
  111. config TWAI_ERRATA_FIX_BUS_OFF_REC
  112. bool "Add SW workaround for REC change during bus-off"
  113. depends on IDF_TARGET_ESP32
  114. default y
  115. help
  116. When the bus-off condition is reached, the REC should be reset to 0 and frozen (via LOM) by the
  117. driver's ISR. However on the ESP32, there is an edge case where the REC will increase before the
  118. driver's ISR can respond in time (e.g., due to the rapid occurrence of bus errors), thus causing the
  119. REC to be non-zero after bus-off. A non-zero REC can prevent bus-off recovery as the bus-off recovery
  120. condition is that both TEC and REC become 0. Enabling this option will add a workaround in the driver
  121. to forcibly reset REC to zero on reaching bus-off.
  122. config TWAI_ERRATA_FIX_TX_INTR_LOST
  123. bool "Add SW workaround for TX interrupt lost errata"
  124. depends on IDF_TARGET_ESP32
  125. default y
  126. help
  127. On the ESP32, when a transmit interrupt occurs, and interrupt register is read on the same APB clock
  128. cycle, the transmit interrupt could be lost. Enabling this option will add a workaround that checks the
  129. transmit buffer status bit to recover any lost transmit interrupt.
  130. config TWAI_ERRATA_FIX_RX_FRAME_INVALID
  131. bool "Add SW workaround for invalid RX frame errata"
  132. depends on IDF_TARGET_ESP32
  133. default y
  134. help
  135. On the ESP32, when receiving a data or remote frame, if a bus error occurs in the data or CRC field,
  136. the data of the next received frame could be invalid. Enabling this option will add a workaround that
  137. will reset the peripheral on detection of this errata condition. Note that if a frame is transmitted on
  138. the bus whilst the reset is ongoing, the message will not be receive by the peripheral sent on the bus
  139. during the reset, the message will be lost.
  140. config TWAI_ERRATA_FIX_RX_FIFO_CORRUPT
  141. bool "Add SW workaround for RX FIFO corruption errata"
  142. depends on IDF_TARGET_ESP32
  143. default y
  144. help
  145. On the ESP32, when the RX FIFO overruns and the RX message counter maxes out at 64 messages, the entire
  146. RX FIFO is no longer recoverable. Enabling this option will add a workaround that resets the peripheral
  147. on detection of this errata condition. Note that if a frame is being sent on the bus during the reset
  148. bus during the reset, the message will be lost.
  149. endmenu # TWAI Configuration
  150. menu "Temperature sensor Configuration"
  151. depends on SOC_TEMP_SENSOR_SUPPORTED
  152. config TEMP_SENSOR_SUPPRESS_DEPRECATE_WARN
  153. bool "Suppress legacy driver deprecated warning"
  154. default n
  155. help
  156. Wether to suppress the deprecation warnings when using legacy temperature sensor driver
  157. (driver/temp_sensor.h). If you want to continue using the legacy driver,
  158. and don't want to see related deprecation warnings, you can enable this option.
  159. config TEMP_SENSOR_ENABLE_DEBUG_LOG
  160. bool "Enable debug log"
  161. default n
  162. help
  163. Wether to enable the debug log message for temperature sensor driver.
  164. Note that, this option only controls the temperature sensor driver log, won't affect other drivers.
  165. endmenu # TEMP_SENSOR Configuration
  166. menu "UART Configuration"
  167. config UART_ISR_IN_IRAM
  168. bool "Place UART ISR function into IRAM"
  169. depends on !RINGBUF_PLACE_ISR_FUNCTIONS_INTO_FLASH
  170. default n
  171. help
  172. If this option is not selected, UART interrupt will be disabled for a long time and
  173. may cause data lost when doing spi flash operation.
  174. endmenu # UART Configuration
  175. menu "GPIO Configuration"
  176. config GPIO_ESP32_SUPPORT_SWITCH_SLP_PULL
  177. bool "Support light sleep GPIO pullup/pulldown configuration for ESP32"
  178. depends on IDF_TARGET_ESP32
  179. help
  180. This option is intended to fix the bug that ESP32 is not able to switch to configured
  181. pullup/pulldown mode in sleep.
  182. If this option is selected, chip will automatically emulate the behaviour of switching,
  183. and about 450B of source codes would be placed into IRAM.
  184. config GPIO_CTRL_FUNC_IN_IRAM
  185. bool "Place GPIO control functions into IRAM"
  186. default n
  187. help
  188. Place GPIO control functions (like intr_disable/set_level) into IRAM,
  189. so that these functions can be IRAM-safe and able to be called in the other IRAM interrupt context.
  190. endmenu # GPIO Configuration
  191. menu "Sigma Delta Modulator Configuration"
  192. depends on SOC_SDM_SUPPORTED
  193. config SDM_CTRL_FUNC_IN_IRAM
  194. bool "Place SDM control functions into IRAM"
  195. default n
  196. help
  197. Place SDM control functions (like set_duty) into IRAM,
  198. so that these functions can be IRAM-safe and able to be called in the other IRAM interrupt context.
  199. Enabling this option can improve driver performance as well.
  200. config SDM_SUPPRESS_DEPRECATE_WARN
  201. bool "Suppress legacy driver deprecated warning"
  202. default n
  203. help
  204. Wether to suppress the deprecation warnings when using legacy sigma delta driver.
  205. If you want to continue using the legacy driver, and don't want to see related deprecation warnings,
  206. you can enable this option.
  207. config SDM_ENABLE_DEBUG_LOG
  208. bool "Enable debug log"
  209. default n
  210. help
  211. Wether to enable the debug log message for SDM driver.
  212. Note that, this option only controls the SDM driver log, won't affect other drivers.
  213. endmenu # Sigma Delta Modulator Configuration
  214. menu "GPTimer Configuration"
  215. config GPTIMER_CTRL_FUNC_IN_IRAM
  216. bool "Place GPTimer control functions into IRAM"
  217. default n
  218. help
  219. Place GPTimer control functions (like start/stop) into IRAM,
  220. so that these functions can be IRAM-safe and able to be called in the other IRAM interrupt context.
  221. Enabling this option can improve driver performance as well.
  222. config GPTIMER_ISR_IRAM_SAFE
  223. bool "GPTimer ISR IRAM-Safe"
  224. default n
  225. help
  226. Ensure the GPTimer interrupt is IRAM-Safe by allowing the interrupt handler to be
  227. executable when the cache is disabled (e.g. SPI Flash write).
  228. config GPTIMER_SUPPRESS_DEPRECATE_WARN
  229. bool "Suppress legacy driver deprecated warning"
  230. default n
  231. help
  232. Wether to suppress the deprecation warnings when using legacy timer group driver (driver/timer.h).
  233. If you want to continue using the legacy driver, and don't want to see related deprecation warnings,
  234. you can enable this option.
  235. config GPTIMER_ENABLE_DEBUG_LOG
  236. bool "Enable debug log"
  237. default n
  238. help
  239. Wether to enable the debug log message for GPTimer driver.
  240. Note that, this option only controls the GPTimer driver log, won't affect other drivers.
  241. endmenu # GPTimer Configuration
  242. menu "PCNT Configuration"
  243. depends on SOC_PCNT_SUPPORTED
  244. config PCNT_CTRL_FUNC_IN_IRAM
  245. bool "Place PCNT control functions into IRAM"
  246. default n
  247. help
  248. Place PCNT control functions (like start/stop) into IRAM,
  249. so that these functions can be IRAM-safe and able to be called in the other IRAM interrupt context.
  250. Enabling this option can improve driver performance as well.
  251. config PCNT_ISR_IRAM_SAFE
  252. bool "PCNT ISR IRAM-Safe"
  253. default n
  254. help
  255. Ensure the PCNT interrupt is IRAM-Safe by allowing the interrupt handler to be
  256. executable when the cache is disabled (e.g. SPI Flash write).
  257. config PCNT_SUPPRESS_DEPRECATE_WARN
  258. bool "Suppress legacy driver deprecated warning"
  259. default n
  260. help
  261. Wether to suppress the deprecation warnings when using legacy PCNT driver (driver/pcnt.h).
  262. If you want to continue using the legacy driver, and don't want to see related deprecation warnings,
  263. you can enable this option.
  264. config PCNT_ENABLE_DEBUG_LOG
  265. bool "Enable debug log"
  266. default n
  267. help
  268. Wether to enable the debug log message for PCNT driver.
  269. Note that, this option only controls the PCNT driver log, won't affect other drivers.
  270. endmenu # PCNT Configuration
  271. menu "RMT Configuration"
  272. depends on SOC_RMT_SUPPORTED
  273. config RMT_ISR_IRAM_SAFE
  274. bool "RMT ISR IRAM-Safe"
  275. default n
  276. select GDMA_ISR_IRAM_SAFE if SOC_RMT_SUPPORT_DMA # RMT basic functionality relies on GDMA callback
  277. select GDMA_CTRL_FUNC_IN_IRAM if SOC_RMT_SUPPORT_DMA # RMT needs to restart the GDMA in the interrupt
  278. help
  279. Ensure the RMT interrupt is IRAM-Safe by allowing the interrupt handler to be
  280. executable when the cache is disabled (e.g. SPI Flash write).
  281. config RMT_SUPPRESS_DEPRECATE_WARN
  282. bool "Suppress legacy driver deprecated warning"
  283. default n
  284. help
  285. Wether to suppress the deprecation warnings when using legacy rmt driver (driver/rmt.h).
  286. If you want to continue using the legacy driver, and don't want to see related deprecation warnings,
  287. you can enable this option.
  288. config RMT_ENABLE_DEBUG_LOG
  289. bool "Enable debug log"
  290. default n
  291. help
  292. Wether to enable the debug log message for RMT driver.
  293. Note that, this option only controls the RMT driver log, won't affect other drivers.
  294. endmenu # RMT Configuration
  295. menu "MCPWM Configuration"
  296. depends on SOC_MCPWM_SUPPORTED
  297. config MCPWM_ISR_IRAM_SAFE
  298. bool "Place MCPWM ISR function into IRAM"
  299. default n
  300. help
  301. This will ensure the MCPWM interrupt handle is IRAM-Safe, allow to avoid flash
  302. cache misses, and also be able to run whilst the cache is disabled.
  303. (e.g. SPI Flash write)
  304. config MCPWM_CTRL_FUNC_IN_IRAM
  305. bool "Place MCPWM control functions into IRAM"
  306. default n
  307. help
  308. Place MCPWM control functions (like set_compare_value) into IRAM,
  309. so that these functions can be IRAM-safe and able to be called in the other IRAM interrupt context.
  310. Enabling this option can improve driver performance as well.
  311. config MCPWM_SUPPRESS_DEPRECATE_WARN
  312. bool "Suppress leagcy driver deprecated warning"
  313. default n
  314. help
  315. Wether to suppress the deprecation warnings when using legacy MCPWM driver (driver/mcpwm.h).
  316. If you want to continue using the legacy driver, and don't want to see related deprecation warnings,
  317. you can enable this option.
  318. config MCPWM_ENABLE_DEBUG_LOG
  319. bool "Enable debug log"
  320. default n
  321. help
  322. Wether to enable the debug log message for MCPWM driver.
  323. Note that, this option only controls the MCPWM driver log, won't affect other drivers.
  324. endmenu # MCPWM Configuration
  325. menu "I2S Configuration"
  326. depends on SOC_I2S_SUPPORTED
  327. config I2S_ISR_IRAM_SAFE
  328. bool "I2S ISR IRAM-Safe"
  329. default n
  330. help
  331. Ensure the I2S interrupt is IRAM-Safe by allowing the interrupt handler to be
  332. executable when the cache is disabled (e.g. SPI Flash write).
  333. config I2S_SUPPRESS_DEPRECATE_WARN
  334. bool "Suppress leagcy driver deprecated warning"
  335. default n
  336. help
  337. Enable this option will suppress the deprecation warnings of using APIs in legacy I2S driver.
  338. config I2S_ENABLE_DEBUG_LOG
  339. bool "Enable I2S debug log"
  340. default n
  341. help
  342. Wether to enable the debug log message for I2S driver.
  343. Note that, this option only controls the I2S driver log, will not affect other drivers.
  344. endmenu # I2S Configuration
  345. menu "DAC Configuration"
  346. depends on SOC_DAC_SUPPORTED
  347. config DAC_CTRL_FUNC_IN_IRAM
  348. bool "Place DAC control functions into IRAM"
  349. default n
  350. help
  351. Place DAC control functions (e.g. 'dac_oneshot_output_voltage') into IRAM,
  352. so that this function can be IRAM-safe and able to be called in the other IRAM interrupt context.
  353. Enabling this option can improve driver performance as well.
  354. config DAC_ISR_IRAM_SAFE
  355. bool "DAC ISR IRAM-Safe"
  356. default n
  357. help
  358. Ensure the DAC interrupt is IRAM-Safe by allowing the interrupt handler to be
  359. executable when the cache is disabled (e.g. SPI Flash write).
  360. config DAC_SUPPRESS_DEPRECATE_WARN
  361. bool "Suppress legacy driver deprecated warning"
  362. default n
  363. help
  364. Wether to suppress the deprecation warnings when using legacy DAC driver (driver/dac.h).
  365. If you want to continue using the legacy driver, and don't want to see related deprecation warnings,
  366. you can enable this option.
  367. config DAC_ENABLE_DEBUG_LOG
  368. bool "Enable debug log"
  369. default n
  370. help
  371. Wether to enable the debug log message for DAC driver.
  372. Note that, this option only controls the DAC driver log, won't affect other drivers.
  373. config DAC_DMA_AUTO_16BIT_ALIGN
  374. bool "Align the continuous data to 16 bit automatically"
  375. depends on SOC_DAC_DMA_16BIT_ALIGN
  376. default y
  377. help
  378. Whether to left shift the continuous data to align every bytes to 16 bits in the driver.
  379. On ESP32, although the DAC resolution is only 8 bits,
  380. the hardware requires 16 bits data in continuous mode.
  381. By enabling this option, the driver will left shift 8 bits for the input data automatically.
  382. Only disable this option when you decide to do this step by yourself.
  383. Note that the driver will allocate a new piece of memory to save the converted data.
  384. endmenu # DAC Configuration
  385. endmenu # Driver configurations