| # Copyright (c) 2023 Espressif Systems (Shanghai) Co., Ltd. |
| # SPDX-License-Identifier: Apache-2.0 |
| |
| config SOC_SERIES_ESP32 |
| select XTENSA |
| select CLOCK_CONTROL |
| select DYNAMIC_INTERRUPTS |
| select ARCH_HAS_GDBSTUB |
| select ARCH_SUPPORTS_COREDUMP |
| select PINCTRL |
| select XIP if !MCUBOOT |
| select HAS_ESPRESSIF_HAL |
| select CPU_HAS_FPU |
| select HAS_PM |
| select HAS_POWEROFF |
| |
| if SOC_SERIES_ESP32 |
| |
| config IDF_TARGET_ESP32 |
| bool "ESP32 as target board" |
| default y |
| |
| config ESP32_APPCPU_IRAM |
| hex "ESP32 APPCPU IRAM size" |
| depends on SOC_ESP32_PROCPU || SOC_ESP32_APPCPU |
| default 0x20000 |
| help |
| Defines APPCPU IRAM area in bytes. |
| |
| config ESP32_APPCPU_DRAM |
| hex "ESP32 APPCPU DRAM size" |
| depends on SOC_ESP32_PROCPU || SOC_ESP32_APPCPU |
| default 0x10000 |
| help |
| Defines APPCPU DRAM area in bytes. |
| |
| config SOC_ENABLE_APPCPU |
| bool |
| default y |
| depends on IPM && SOC_ESP32_PROCPU |
| help |
| This hidden configuration lets PROCPU core to map and start APPCPU whenever IPM is enabled. |
| |
| config ESP_SYSTEM_RTC_EXT_XTAL |
| bool |
| |
| config ESP_SYSTEM_RTC_EXT_OSC |
| bool |
| |
| config ESP32_BT_RESERVE_DRAM |
| hex "Bluetooth controller reserved RAM region" |
| default 0xdb5c if BT |
| default 0 |
| |
| config ESP_HEAP_MEM_POOL_REGION_1_SIZE |
| int "Internal DRAM region 1 mempool size" |
| default 0 if MCUBOOT |
| default 1024 if SOC_ESP32_PROCPU |
| default 49152 |
| help |
| ESP32 has two banks of size 192K and 128K which can be used |
| as DRAM, system heap allocates area from region 0. |
| This configuration can be used to add memory from region 1 |
| to heap and can be allocated using k_malloc. |
| |
| choice ESP32_RTC_CLK_SRC |
| prompt "RTC clock source" |
| default ESP32_RTC_CLK_SRC_INT_RC |
| help |
| Choose which clock is used as RTC clock source. |
| |
| - "Internal 150kHz oscillator" option provides lowest deep sleep current |
| consumption, and does not require extra external components. However |
| frequency stability with respect to temperature is poor, so time may |
| drift in deep/light sleep modes. |
| - "External 32kHz crystal" provides better frequency stability, at the |
| expense of slightly higher (1uA) deep sleep current consumption. |
| - "External 32kHz oscillator" allows using 32kHz clock generated by an |
| external circuit. In this case, external clock signal must be connected |
| to 32K_XN pin. Amplitude should be <1.2V in case of sine wave signal, |
| and <1V in case of square wave signal. Common mode voltage should be |
| 0.1 < Vcm < 0.5Vamp, where Vamp is the signal amplitude. |
| Additionally, 1nF capacitor must be connected between 32K_XP pin and |
| ground. 32K_XP pin can not be used as a GPIO in this case. |
| - "Internal 8.5MHz oscillator divided by 256" option results in higher |
| deep sleep current (by 5uA) but has better frequency stability than |
| the internal 150kHz oscillator. It does not require external components. |
| |
| config ESP32_RTC_CLK_SRC_INT_RC |
| bool "Internal 150kHz RC oscillator" |
| |
| config ESP32_RTC_CLK_SRC_EXT_CRYS |
| bool "External 32kHz crystal" |
| select ESP_SYSTEM_RTC_EXT_XTAL |
| |
| config ESP32_RTC_CLK_SRC_EXT_OSC |
| bool "External 32kHz oscillator at 32K_XN pin" |
| select ESP_SYSTEM_RTC_EXT_OSC |
| |
| config ESP32_RTC_CLK_SRC_INT_8MD256 |
| bool "Internal 8.5MHz oscillator, divided by 256 (~33kHz)" |
| |
| endchoice # ESP32_RTC_CLK_SRC |
| |
| config ESP32_RTC_CLK_CAL_CYCLES |
| int "Number of cycles for RTC_SLOW_CLK calibration" |
| default 3000 if ESP32_RTC_CLK_SRC_EXT_CRYS || ESP32_RTC_CLK_SRC_EXT_OSC || ESP32_RTC_CLK_SRC_INT_8MD256 |
| default 1024 if ESP32_RTC_CLK_SRC_INT_RC |
| range 0 27000 if ESP32_RTC_CLK_SRC_EXT_CRYS || ESP32_RTC_CLK_SRC_EXT_OSC || ESP32_RTC_CLK_SRC_INT_8MD256 |
| range 0 32766 if ESP32_RTC_CLK_SRC_INT_RC |
| help |
| When the startup code initializes RTC_SLOW_CLK, it can perform |
| calibration by comparing the RTC_SLOW_CLK frequency with main XTAL |
| frequency. This option sets the number of RTC_SLOW_CLK cycles measured |
| by the calibration routine. Higher numbers increase calibration |
| precision, which may be important for applications which spend a lot of |
| time in deep sleep. Lower numbers reduce startup time. |
| |
| When this option is set to 0, clock calibration will not be performed at |
| startup, and approximate clock frequencies will be assumed: |
| |
| - 150000 Hz if internal RC oscillator is used as clock source. For this use value 1024. |
| - 32768 Hz if the 32k crystal oscillator is used. For this use value 3000 or more. |
| In case more value will help improve the definition of the launch of the crystal. |
| If the crystal could not start, it will be switched to internal RC. |
| |
| config ESP32_RTC_XTAL_CAL_RETRY |
| int "Number of attempts to repeat 32k XTAL calibration" |
| default 1 |
| depends on ESP32_RTC_CLK_SRC_EXT_CRYS |
| help |
| Number of attempts to repeat 32k XTAL calibration |
| before giving up and switching to the internal RC. |
| Increase this option if the 32k crystal oscillator |
| does not start and switches to internal RC. |
| |
| config ESP32_DEEP_SLEEP_WAKEUP_DELAY |
| int "Extra delay in deep sleep wake stub (in us)" |
| default 2000 |
| range 0 5000 |
| help |
| When ESP32 exits deep sleep, the CPU and the flash chip are powered on |
| at the same time. CPU will run deep sleep stub first, and then |
| proceed to load code from flash. Some flash chips need sufficient |
| time to pass between power on and first read operation. By default, |
| without any extra delay, this time is approximately 900us, although |
| some flash chip types need more than that. |
| |
| By default extra delay is set to 2000us. When optimizing startup time |
| for applications which require it, this value may be reduced. |
| |
| If you are seeing "flash read err, 1000" message printed to the |
| console after deep sleep reset, try increasing this value. |
| |
| choice ESP32_UNIVERSAL_MAC_ADDRESSES |
| bool "Number of universally administered (by IEEE) MAC address" |
| default ESP32_UNIVERSAL_MAC_ADDRESSES_FOUR |
| help |
| Configure the number of universally administered (by IEEE) MAC addresses. |
| During initialization, MAC addresses for each network interface are generated or |
| derived from a single base MAC address. If the number of universal MAC addresses is four, |
| all four interfaces (WiFi station, WiFi softap, Bluetooth and Ethernet) receive a universally |
| administered MAC address. These are generated sequentially by adding 0, 1, 2 and 3 (respectively) |
| to the final octet of the base MAC address. If the number of universal MAC addresses is two, |
| only two interfaces (WiFi station and Bluetooth) receive a universally administered MAC address. |
| These are generated sequentially by adding 0 and 1 (respectively) to the base MAC address. |
| The remaining two interfaces (WiFi softap and Ethernet) receive local MAC addresses. |
| These are derived from the universal WiFi station and Bluetooth MAC addresses, respectively. |
| When using the default (Espressif-assigned) base MAC address, either setting can be used. |
| When using a custom universal MAC address range, the correct setting will depend on the |
| allocation of MAC addresses in this range (either 2 or 4 per device.) |
| |
| config ESP32_UNIVERSAL_MAC_ADDRESSES_TWO |
| bool "Two" |
| select ESP_MAC_ADDR_UNIVERSE_WIFI_STA |
| select ESP_MAC_ADDR_UNIVERSE_BT |
| |
| config ESP32_UNIVERSAL_MAC_ADDRESSES_FOUR |
| bool "Four" |
| select ESP_MAC_ADDR_UNIVERSE_WIFI_STA |
| select ESP_MAC_ADDR_UNIVERSE_WIFI_AP |
| select ESP_MAC_ADDR_UNIVERSE_BT |
| select ESP_MAC_ADDR_UNIVERSE_ETH |
| |
| endchoice # ESP32_UNIVERSAL_MAC_ADDRESSES |
| |
| config ESP_MAC_ADDR_UNIVERSE_WIFI_AP |
| bool |
| |
| config ESP_MAC_ADDR_UNIVERSE_WIFI_STA |
| bool |
| |
| config ESP_MAC_ADDR_UNIVERSE_BT |
| bool |
| |
| config ESP_MAC_ADDR_UNIVERSE_ETH |
| bool |
| |
| config ESP32_UNIVERSAL_MAC_ADDRESSES |
| int |
| default 2 if ESP32_UNIVERSAL_MAC_ADDRESSES_TWO |
| default 4 if ESP32_UNIVERSAL_MAC_ADDRESSES_FOUR |
| |
| config ESP32_PHY_MAX_WIFI_TX_POWER |
| int "Max WiFi/BLE TX power (dBm)" |
| range 10 20 |
| default 20 |
| help |
| Set maximum transmit power for WiFi radio. Actual transmit power for high |
| data rates may be lower than this setting. |
| |
| config ESP32_PHY_MAX_TX_POWER |
| int |
| default ESP32_PHY_MAX_WIFI_TX_POWER |
| |
| config ESP32_EMAC |
| bool |
| default y if ETH_ESP32 |
| default y if MDIO_ESP32 |
| default n |
| help |
| Hidden option to enable the ESP32 Ethernet MAC driver. |
| Both Ethernet and MDIO depend on this driver. |
| This option allows enabling MDIO independently of Ethernet. |
| |
| if ESP32_EMAC |
| |
| config ETH_DMA_BUFFER_SIZE |
| int "Ethernet DMA buffer size (Byte)" |
| range 256 1600 |
| default 512 |
| help |
| Set the size of each buffer used by Ethernet MAC DMA. |
| |
| config ETH_DMA_RX_BUFFER_NUM |
| int "Amount of Ethernet DMA Rx buffers" |
| range 3 30 |
| default 10 |
| help |
| Number of DMA receive buffers. Each buffer's size is ETH_DMA_BUFFER_SIZE. |
| Larger number of buffers could increase throughput somehow. |
| |
| config ETH_DMA_TX_BUFFER_NUM |
| int "Amount of Ethernet DMA Tx buffers" |
| range 3 30 |
| default 10 |
| help |
| Number of DMA transmit buffers. Each buffer's size is ETH_DMA_BUFFER_SIZE. |
| Larger number of buffers could increase throughput somehow. |
| |
| endif # ESP32_EMAC config |
| |
| endif # SOC_SERIES_ESP32 |