2018-06-11 07:54:18 -04:00
|
|
|
menu "Driver configurations"
|
2018-03-07 02:04:43 -05:00
|
|
|
|
2019-01-25 11:10:53 -05:00
|
|
|
menu "ADC configuration"
|
2018-03-07 02:04:43 -05:00
|
|
|
|
2019-01-25 11:10:53 -05:00
|
|
|
config ADC_FORCE_XPD_FSM
|
|
|
|
bool "Use the FSM to control ADC power"
|
|
|
|
default n
|
|
|
|
help
|
|
|
|
ADC power can be controlled by the FSM instead of software. This allows the ADC to
|
|
|
|
be shut off when it is not working leading to lower power consumption. However
|
|
|
|
using the FSM control ADC power will increase the noise of ADC.
|
2018-03-07 02:04:43 -05:00
|
|
|
|
2019-04-29 08:22:57 -04:00
|
|
|
config ADC_DISABLE_DAC
|
2019-01-25 11:10:53 -05:00
|
|
|
bool "Disable DAC when ADC2 is used on GPIO 25 and 26"
|
|
|
|
default y
|
|
|
|
help
|
2019-04-29 08:22:57 -04:00
|
|
|
If this is set, the ADC2 driver will disable the output of the DAC corresponding to the specified
|
2019-01-25 11:10:53 -05:00
|
|
|
channel. This is the default value.
|
2018-01-24 05:46:34 -05:00
|
|
|
|
2019-01-25 11:10:53 -05:00
|
|
|
For testing, disable this option so that we can measure the output of DAC by internal ADC.
|
2018-01-24 05:46:34 -05:00
|
|
|
|
2022-12-15 22:36:51 -05:00
|
|
|
config ADC_CONTINUOUS_FORCE_USE_ADC2_ON_C3_S3
|
|
|
|
depends on IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32S3
|
|
|
|
bool "Force use ADC2 continumous mode on ESP32S3 or ESP32C3"
|
|
|
|
default n
|
|
|
|
help
|
|
|
|
On ESP32C3 and ESP32S3, ADC2 Digital Controller is not stable. Therefore,
|
|
|
|
ADC2 continuous mode is not suggested on ESP32S3 and ESP32C3
|
|
|
|
|
|
|
|
If you stick to this, you can enable this option to force use ADC2 under above conditions.
|
|
|
|
For more details, you can search for errata on espressif website.
|
|
|
|
|
2022-12-15 23:02:55 -05:00
|
|
|
config ADC_ONESHOT_FORCE_USE_ADC2_ON_C3
|
|
|
|
depends on IDF_TARGET_ESP32C3
|
|
|
|
bool "Force use ADC2 oneshot mode on ESP32C3"
|
|
|
|
default n
|
|
|
|
help
|
|
|
|
On ESP32C3, ADC2 Digital Controller is not stable. Therefore,
|
|
|
|
ADC2 oneshot mode is not suggested on ESP32C3
|
|
|
|
|
|
|
|
If you stick to this, you can enable this option to force use ADC2 under above conditions.
|
|
|
|
For more details, you can search for errata on espressif website.
|
|
|
|
|
2019-01-25 11:10:53 -05:00
|
|
|
endmenu # ADC Configuration
|
2018-03-07 02:04:43 -05:00
|
|
|
|
2021-08-25 05:45:46 -04:00
|
|
|
menu "MCPWM configuration"
|
|
|
|
|
|
|
|
config MCPWM_ISR_IN_IRAM
|
|
|
|
bool "Place MCPWM ISR function into IRAM"
|
|
|
|
default n
|
|
|
|
help
|
|
|
|
If this option is not selected, the MCPWM interrupt will be deferred when the Cache
|
|
|
|
is in a disabled state (e.g. Flash write/erase operation).
|
|
|
|
|
|
|
|
Note that if this option is selected, all user registered ISR callbacks should never
|
|
|
|
try to use cache as well. (with IRAM_ATTR)
|
|
|
|
|
|
|
|
endmenu # MCPWM Configuration
|
|
|
|
|
2019-01-25 11:10:53 -05:00
|
|
|
menu "SPI configuration"
|
2018-03-07 02:04:43 -05:00
|
|
|
|
2019-01-25 11:10:53 -05:00
|
|
|
config SPI_MASTER_IN_IRAM
|
|
|
|
bool "Place transmitting functions of SPI master into IRAM"
|
|
|
|
default n
|
|
|
|
select SPI_MASTER_ISR_IN_IRAM
|
|
|
|
help
|
|
|
|
Normally only the ISR of SPI master is placed in the IRAM, so that it
|
|
|
|
can work without the flash when interrupt is triggered.
|
|
|
|
For other functions, there's some possibility that the flash cache
|
|
|
|
miss when running inside and out of SPI functions, which may increase
|
|
|
|
the interval of SPI transactions.
|
|
|
|
Enable this to put ``queue_trans``, ``get_trans_result`` and
|
|
|
|
``transmit`` functions into the IRAM to avoid possible cache miss.
|
2018-06-11 07:54:18 -04:00
|
|
|
|
2019-01-25 11:10:53 -05:00
|
|
|
During unit test, this is enabled to measure the ideal case of api.
|
2018-06-11 07:54:18 -04:00
|
|
|
|
2019-01-25 11:10:53 -05:00
|
|
|
config SPI_MASTER_ISR_IN_IRAM
|
|
|
|
bool "Place SPI master ISR function into IRAM"
|
|
|
|
default y
|
|
|
|
help
|
|
|
|
Place the SPI master ISR in to IRAM to avoid possible cache miss.
|
2018-10-23 04:57:32 -04:00
|
|
|
|
2019-01-25 11:10:53 -05:00
|
|
|
Also you can forbid the ISR being disabled during flash writing
|
|
|
|
access, by add ESP_INTR_FLAG_IRAM when initializing the driver.
|
2018-06-11 07:54:18 -04:00
|
|
|
|
2019-01-25 11:10:53 -05:00
|
|
|
config SPI_SLAVE_IN_IRAM
|
|
|
|
bool "Place transmitting functions of SPI slave into IRAM"
|
|
|
|
default n
|
|
|
|
select SPI_SLAVE_ISR_IN_IRAM
|
|
|
|
help
|
|
|
|
Normally only the ISR of SPI slave is placed in the IRAM, so that it
|
|
|
|
can work without the flash when interrupt is triggered.
|
|
|
|
For other functions, there's some possibility that the flash cache
|
|
|
|
miss when running inside and out of SPI functions, which may increase
|
|
|
|
the interval of SPI transactions.
|
|
|
|
Enable this to put ``queue_trans``, ``get_trans_result`` and
|
|
|
|
``transmit`` functions into the IRAM to avoid possible cache miss.
|
2018-08-20 06:30:40 -04:00
|
|
|
|
2019-01-25 11:10:53 -05:00
|
|
|
config SPI_SLAVE_ISR_IN_IRAM
|
|
|
|
bool "Place SPI slave ISR function into IRAM"
|
|
|
|
default y
|
|
|
|
help
|
|
|
|
Place the SPI slave ISR in to IRAM to avoid possible cache miss.
|
2018-10-23 04:57:32 -04:00
|
|
|
|
2019-01-25 11:10:53 -05:00
|
|
|
Also you can forbid the ISR being disabled during flash writing
|
|
|
|
access, by add ESP_INTR_FLAG_IRAM when initializing the driver.
|
2018-08-20 06:30:40 -04:00
|
|
|
|
2019-01-25 11:10:53 -05:00
|
|
|
endmenu # SPI Configuration
|
2018-06-11 07:54:18 -04:00
|
|
|
|
2020-08-04 00:52:10 -04:00
|
|
|
menu "TWAI configuration"
|
|
|
|
|
|
|
|
config TWAI_ISR_IN_IRAM
|
|
|
|
bool "Place TWAI ISR function into IRAM"
|
|
|
|
default n
|
|
|
|
help
|
|
|
|
Place the TWAI ISR in to IRAM. This will allow the ISR to avoid
|
|
|
|
cache misses, and also be able to run whilst the cache is disabled
|
|
|
|
(such as when writing to SPI Flash).
|
|
|
|
Note that if this option is enabled:
|
|
|
|
- Users should also set the ESP_INTR_FLAG_IRAM in the driver
|
|
|
|
configuration structure when installing the driver (see docs for
|
|
|
|
specifics).
|
|
|
|
- Alert logging (i.e., setting of the TWAI_ALERT_AND_LOG flag)
|
|
|
|
will have no effect.
|
|
|
|
|
2021-03-24 22:24:37 -04:00
|
|
|
config TWAI_ERRATA_FIX_BUS_OFF_REC
|
|
|
|
bool "Add SW workaround for REC change during bus-off"
|
|
|
|
depends on IDF_TARGET_ESP32
|
|
|
|
default n
|
|
|
|
help
|
|
|
|
When the bus-off condition is reached, the REC should be reset to 0 and frozen (via LOM) by the
|
|
|
|
driver's ISR. However on the ESP32, there is an edge case where the REC will increase before the
|
|
|
|
driver's ISR can respond in time (e.g., due to the rapid occurrence of bus errors), thus causing the
|
|
|
|
REC to be non-zero after bus-off. A non-zero REC can prevent bus-off recovery as the bus-off recovery
|
|
|
|
condition is that both TEC and REC become 0. Enabling this option will add a workaround in the driver
|
|
|
|
to forcibly reset REC to zero on reaching bus-off.
|
|
|
|
|
|
|
|
config TWAI_ERRATA_FIX_TX_INTR_LOST
|
|
|
|
bool "Add SW workaround for TX interrupt lost errata"
|
|
|
|
depends on IDF_TARGET_ESP32
|
|
|
|
default n
|
|
|
|
help
|
|
|
|
On the ESP32, when a transmit interrupt occurs, and interrupt register is read on the same APB clock
|
|
|
|
cycle, the transmit interrupt could be lost. Enabling this option will add a workaround that checks the
|
|
|
|
transmit buffer status bit to recover any lost transmit interrupt.
|
|
|
|
|
|
|
|
config TWAI_ERRATA_FIX_RX_FRAME_INVALID
|
|
|
|
bool "Add SW workaround for invalid RX frame errata"
|
|
|
|
depends on IDF_TARGET_ESP32
|
|
|
|
default n
|
|
|
|
help
|
|
|
|
On the ESP32, when receiving a data or remote frame, if a bus error occurs in the data or CRC field,
|
|
|
|
the data of the next received frame could be invalid. Enabling this option will add a workaround that
|
|
|
|
will reset the peripheral on detection of this errata condition. Note that if a frame is transmitted on
|
|
|
|
the bus whilst the reset is ongoing, the message will not be receive by the peripheral sent on the bus
|
|
|
|
during the reset, the message will be lost.
|
|
|
|
|
|
|
|
config TWAI_ERRATA_FIX_RX_FIFO_CORRUPT
|
|
|
|
bool "Add SW workaround for RX FIFO corruption errata"
|
|
|
|
depends on IDF_TARGET_ESP32
|
|
|
|
default n
|
|
|
|
help
|
|
|
|
On the ESP32, when the RX FIFO overruns and the RX message counter maxes out at 64 messages, the entire
|
|
|
|
RX FIFO is no longer recoverable. Enabling this option will add a workaround that resets the peripheral
|
|
|
|
on detection of this errata condition. Note that if a frame is being sent on the bus during the reset
|
|
|
|
bus during the reset, the message will be lost.
|
|
|
|
|
twai: Add errata workaround for listen only mode
This commit adds a workaround for the TWAI listen only mode errata which is
present on the ESP32, ESP32-S2, ESP32-S3, and ESP32-C3. twai_get_status_info()
has also been updated to account for the fact that TEC/REC are frozen in
listen only mode.
Errata Description:
When the TWAI controller is put into listen only mode, it should not influence
the TWAI bus in any way (i.e., should never send a dominant bit). However,
on the targets listed above, the TWAI controller will send dominant bits in an
error frame (i.e., active error frame), even if the controller is set to listen
only mode.
Workaround:
We can force the TWAI controller into the error passive state on startup (by
setting the REC to >= 128). Since the TEC/REC are frozen in listen only mode,
the TWAI controller will remain error passive and only send recessive bits
(i.e., passive error frames), thus will not influence the TWAI bus.
Closes https://github.com/espressif/esp-idf/issues/9157
2023-02-24 06:42:03 -05:00
|
|
|
config TWAI_ERRATA_FIX_LISTEN_ONLY_DOM
|
|
|
|
bool "Add SW workaround for listen only transmits dominant bit errata"
|
|
|
|
depends on IDF_TARGET_ESP32 || IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32S3 || IDF_TARGET_ESP32C3
|
|
|
|
default n
|
|
|
|
help
|
|
|
|
When in the listen only mode, the TWAI controller must not influence the TWAI bus (i.e., must not send
|
|
|
|
any dominant bits). However, while in listen only mode on the ESP32/ESP32-S2/ESP32-S3/ESP32-C3, the
|
|
|
|
TWAI controller will still transmit dominant bits when it detects an error (i.e., as part of an active
|
|
|
|
error frame). Enabling this option will add a workaround that forces the TWAI controller into an error
|
|
|
|
passive state on initialization, thus preventing any dominant bits from being sent.
|
|
|
|
|
2020-08-04 00:52:10 -04:00
|
|
|
endmenu # TWAI Configuration
|
|
|
|
|
2019-08-26 05:14:15 -04:00
|
|
|
menu "UART configuration"
|
|
|
|
|
|
|
|
config UART_ISR_IN_IRAM
|
|
|
|
bool "Place UART ISR function into IRAM"
|
2022-06-30 03:43:45 -04:00
|
|
|
depends on !RINGBUF_PLACE_ISR_FUNCTIONS_INTO_FLASH
|
2019-08-26 05:14:15 -04:00
|
|
|
default n
|
|
|
|
help
|
|
|
|
If this option is not selected, UART interrupt will be disabled for a long time and
|
|
|
|
may cause data lost when doing spi flash operation.
|
|
|
|
|
|
|
|
endmenu # UART Configuration
|
|
|
|
|
2019-07-25 11:11:31 -04:00
|
|
|
menu "RTCIO configuration"
|
2019-12-12 10:02:36 -05:00
|
|
|
visible if IDF_TARGET_ESP32
|
2019-07-25 11:11:31 -04:00
|
|
|
|
|
|
|
config RTCIO_SUPPORT_RTC_GPIO_DESC
|
|
|
|
bool "Support array `rtc_gpio_desc` for ESP32"
|
|
|
|
depends on IDF_TARGET_ESP32
|
|
|
|
default n
|
|
|
|
help
|
|
|
|
The the array `rtc_gpio_desc` will don't compile by default.
|
|
|
|
If this option is selected, the array `rtc_gpio_desc` can be compile.
|
|
|
|
If user use this array, please enable this configuration.
|
|
|
|
|
|
|
|
endmenu # RTCIO Configuration
|
|
|
|
|
2020-11-12 07:39:55 -05:00
|
|
|
menu "GPIO Configuration"
|
|
|
|
visible if IDF_TARGET_ESP32
|
|
|
|
|
|
|
|
config GPIO_ESP32_SUPPORT_SWITCH_SLP_PULL
|
|
|
|
bool "Support light sleep GPIO pullup/pulldown configuration for ESP32"
|
|
|
|
depends on IDF_TARGET_ESP32
|
|
|
|
help
|
|
|
|
This option is intended to fix the bug that ESP32 is not able to switch to configured
|
|
|
|
pullup/pulldown mode in sleep.
|
|
|
|
If this option is selected, chip will automatically emulate the behaviour of switching,
|
|
|
|
and about 450B of source codes would be placed into IRAM.
|
|
|
|
|
|
|
|
endmenu # GPIO Configuration
|
|
|
|
|
2021-11-07 21:26:52 -05:00
|
|
|
menu "GDMA Configuration"
|
|
|
|
config GDMA_CTRL_FUNC_IN_IRAM
|
|
|
|
bool "Place GDMA control functions into IRAM"
|
|
|
|
default n
|
|
|
|
help
|
|
|
|
Place GDMA control functions (like start/stop/append/reset) into IRAM,
|
|
|
|
so that these functions can be IRAM-safe and able to be called in the other IRAM interrupt context.
|
|
|
|
Enabling this option can improve driver performance as well.
|
|
|
|
|
|
|
|
config GDMA_ISR_IRAM_SAFE
|
|
|
|
bool "GDMA ISR IRAM-Safe"
|
|
|
|
default n
|
|
|
|
help
|
|
|
|
This will ensure the GDMA interrupt handler is IRAM-Safe, allow to avoid flash
|
|
|
|
cache misses, and also be able to run whilst the cache is disabled.
|
|
|
|
(e.g. SPI Flash write).
|
|
|
|
endmenu # GDMA Configuration
|
|
|
|
|
2018-06-11 07:54:18 -04:00
|
|
|
endmenu # Driver configurations
|