mirror of
https://github.com/espressif/esp-idf.git
synced 2025-11-15 15:00:02 +01:00
soc: moved kconfig options out of the target component.
Moved the following kconfig options out of the target component: * CONFIG_ESP*_DEFAULT_CPU_FREQ* -> esp_system * ESP*_REV_MIN -> esp_hw_support * ESP*_TIME_SYSCALL -> newlib * ESP*_RTC_* -> esp_hw_support Where applicable these target specific konfig names were merged into a single common config, e.g; CONFIG_ESP*_DEFAULT_CPU_FREQ -> CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ
This commit is contained in:
@@ -9,60 +9,10 @@ menu "ESP32-specific"
|
||||
default y
|
||||
depends on !FREERTOS_UNICORE && ESP32_SPIRAM_SUPPORT
|
||||
|
||||
choice ESP32_REV_MIN
|
||||
prompt "Minimum Supported ESP32 Revision"
|
||||
default ESP32_REV_MIN_0
|
||||
help
|
||||
Minimum revision that ESP-IDF would support.
|
||||
ESP-IDF performs different strategy on different esp32 revision.
|
||||
|
||||
config ESP32_REV_MIN_0
|
||||
bool "Rev 0"
|
||||
config ESP32_REV_MIN_1
|
||||
bool "Rev 1"
|
||||
config ESP32_REV_MIN_2
|
||||
bool "Rev 2"
|
||||
config ESP32_REV_MIN_3
|
||||
bool "Rev 3"
|
||||
select ESP_INT_WDT if ESP32_ECO3_CACHE_LOCK_FIX
|
||||
endchoice
|
||||
|
||||
config ESP32_REV_MIN
|
||||
int
|
||||
default 0 if ESP32_REV_MIN_0
|
||||
default 1 if ESP32_REV_MIN_1
|
||||
default 2 if ESP32_REV_MIN_2
|
||||
default 3 if ESP32_REV_MIN_3
|
||||
|
||||
config ESP32_DPORT_WORKAROUND
|
||||
bool
|
||||
default "y" if !FREERTOS_UNICORE && ESP32_REV_MIN < 2
|
||||
|
||||
choice ESP32_DEFAULT_CPU_FREQ_MHZ
|
||||
prompt "CPU frequency"
|
||||
default ESP32_DEFAULT_CPU_FREQ_40 if IDF_ENV_FPGA
|
||||
default ESP32_DEFAULT_CPU_FREQ_160
|
||||
help
|
||||
CPU frequency to be set on application startup.
|
||||
|
||||
config ESP32_DEFAULT_CPU_FREQ_40
|
||||
bool "40 MHz"
|
||||
depends on IDF_ENV_FPGA
|
||||
config ESP32_DEFAULT_CPU_FREQ_80
|
||||
bool "80 MHz"
|
||||
config ESP32_DEFAULT_CPU_FREQ_160
|
||||
bool "160 MHz"
|
||||
config ESP32_DEFAULT_CPU_FREQ_240
|
||||
bool "240 MHz"
|
||||
endchoice
|
||||
|
||||
config ESP32_DEFAULT_CPU_FREQ_MHZ
|
||||
int
|
||||
default 40 if ESP32_DEFAULT_CPU_FREQ_40
|
||||
default 80 if ESP32_DEFAULT_CPU_FREQ_80
|
||||
default 160 if ESP32_DEFAULT_CPU_FREQ_160
|
||||
default 240 if ESP32_DEFAULT_CPU_FREQ_240
|
||||
|
||||
# Note: to support SPIRAM across multiple chips, check CONFIG_SPIRAM
|
||||
# instead
|
||||
config ESP32_SPIRAM_SUPPORT
|
||||
@@ -500,140 +450,6 @@ menu "ESP32-specific"
|
||||
default 0x4000 if ESP32_MEMMAP_TRACEMEM && !ESP32_MEMMAP_TRACEMEM_TWOBANKS
|
||||
default 0x0
|
||||
|
||||
choice ESP32_TIME_SYSCALL
|
||||
prompt "Timers used for gettimeofday function"
|
||||
default ESP32_TIME_SYSCALL_USE_RTC_HRT
|
||||
help
|
||||
This setting defines which hardware timers are used to
|
||||
implement 'gettimeofday' and 'time' functions in C library.
|
||||
|
||||
- If both high-resolution and RTC timers are used, timekeeping will
|
||||
continue in deep sleep. Time will be reported at 1 microsecond
|
||||
resolution. This is the default, and the recommended option.
|
||||
- If only high-resolution timer is used, gettimeofday will
|
||||
provide time at microsecond resolution.
|
||||
Time will not be preserved when going into deep sleep mode.
|
||||
- If only RTC timer is used, timekeeping will continue in
|
||||
deep sleep, but time will be measured at 6.(6) microsecond
|
||||
resolution. Also the gettimeofday function itself may take
|
||||
longer to run.
|
||||
- If no timers are used, gettimeofday and time functions
|
||||
return -1 and set errno to ENOSYS.
|
||||
- When RTC is used for timekeeping, two RTC_STORE registers are
|
||||
used to keep time in deep sleep mode.
|
||||
|
||||
config ESP32_TIME_SYSCALL_USE_RTC_HRT
|
||||
bool "RTC and high-resolution timer"
|
||||
select ESP_TIME_FUNCS_USE_RTC_TIMER
|
||||
select ESP_TIME_FUNCS_USE_ESP_TIMER
|
||||
config ESP32_TIME_SYSCALL_USE_RTC
|
||||
bool "RTC"
|
||||
select ESP_TIME_FUNCS_USE_RTC_TIMER
|
||||
config ESP32_TIME_SYSCALL_USE_HRT
|
||||
bool "High-resolution timer"
|
||||
select ESP_TIME_FUNCS_USE_ESP_TIMER
|
||||
config ESP32_TIME_SYSCALL_USE_NONE
|
||||
bool "None"
|
||||
select ESP_TIME_FUNCS_USE_NONE
|
||||
endchoice
|
||||
|
||||
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
|
||||
|
||||
choice ESP32_RTC_EXT_CRYST_ADDIT_CURRENT_METHOD
|
||||
prompt "Additional current for external 32kHz crystal"
|
||||
depends on ESP32_RTC_CLK_SRC_EXT_CRYS
|
||||
depends on ESP32_REV_MIN <= 1
|
||||
default ESP32_RTC_EXT_CRYST_ADDIT_CURRENT_NONE
|
||||
help
|
||||
With some 32kHz crystal configurations, the X32N and X32P pins may not have enough
|
||||
drive strength to keep the crystal oscillating. Choose the method to provide
|
||||
additional current from touchpad 9 to the external 32kHz crystal. Note that
|
||||
the deep sleep current is slightly high (4-5uA) and the touchpad and the
|
||||
wakeup sources of both touchpad and ULP are not available in method 1 and method 2.
|
||||
|
||||
This problem is fixed in ESP32 ECO 3, so this workaround is not needed. Setting the
|
||||
project configuration to minimum revision ECO3 will disable this option, , allow
|
||||
all wakeup sources, and save some code size.
|
||||
|
||||
- "None" option will not provide additional current to external crystal
|
||||
- "Method 1" option can't ensure 100% to solve the external 32k crystal start failed
|
||||
issue, but the touchpad can work in this method.
|
||||
- "Method 2" option can solve the external 32k issue, but the touchpad can't work
|
||||
in this method.
|
||||
|
||||
config ESP32_RTC_EXT_CRYST_ADDIT_CURRENT_NONE
|
||||
bool "None"
|
||||
config ESP32_RTC_EXT_CRYST_ADDIT_CURRENT
|
||||
bool "Method 1"
|
||||
config ESP32_RTC_EXT_CRYST_ADDIT_CURRENT_V2
|
||||
bool "Method 2"
|
||||
endchoice
|
||||
|
||||
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
|
||||
@@ -694,14 +510,6 @@ menu "ESP32-specific"
|
||||
|
||||
(Enabling secure boot also disables the BASIC ROM Console by default.)
|
||||
|
||||
config ESP32_NO_BLOBS
|
||||
bool "No Binary Blobs"
|
||||
depends on !BT_ENABLED
|
||||
default n
|
||||
help
|
||||
If enabled, this disables the linking of binary libraries in the application build. Note
|
||||
that after enabling this Wi-Fi/Bluetooth will not work.
|
||||
|
||||
config ESP32_COMPATIBLE_PRE_V2_1_BOOTLOADERS
|
||||
bool "App compatible with bootloaders before ESP-IDF v2.1"
|
||||
select ESP32_COMPATIBLE_PRE_V3_1_BOOTLOADERS
|
||||
|
||||
@@ -6,17 +6,8 @@ CONFIG_SPIRAM_SUPPORT CONFIG_ESP32_SPIRAM_SUPP
|
||||
CONFIG_MEMMAP_TRACEMEM CONFIG_ESP32_MEMMAP_TRACEMEM
|
||||
CONFIG_MEMMAP_TRACEMEM_TWOBANKS CONFIG_ESP32_MEMMAP_TRACEMEM_TWOBANKS
|
||||
CONFIG_TRACEMEM_RESERVE_DRAM CONFIG_ESP32_TRACEMEM_RESERVE_DRAM
|
||||
CONFIG_ESP32_RTC_EXTERNAL_CRYSTAL_ADDITIONAL_CURRENT CONFIG_ESP32_RTC_EXT_CRYST_ADDIT_CURRENT
|
||||
CONFIG_ESP32_RTC_CLOCK_SOURCE CONFIG_ESP32_RTC_CLK_SRC
|
||||
CONFIG_ESP32_RTC_CLOCK_SOURCE_INTERNAL_RC CONFIG_ESP32_RTC_CLK_SRC_INT_RC
|
||||
CONFIG_ESP32_RTC_CLOCK_SOURCE_EXTERNAL_CRYSTAL CONFIG_ESP32_RTC_CLK_SRC_EXT_CRYS
|
||||
CONFIG_ESP32_RTC_CLOCK_SOURCE_EXTERNAL_OSC CONFIG_ESP32_RTC_CLK_SRC_EXT_OSC
|
||||
CONFIG_ESP32_RTC_CLOCK_SOURCE_INTERNAL_8MD256 CONFIG_ESP32_RTC_CLK_SRC_INT_8MD256
|
||||
CONFIG_DISABLE_BASIC_ROM_CONSOLE CONFIG_ESP32_DISABLE_BASIC_ROM_CONSOLE
|
||||
CONFIG_COMPATIBLE_PRE_V2_1_BOOTLOADERS CONFIG_ESP32_COMPATIBLE_PRE_V2_1_BOOTLOADERS
|
||||
CONFIG_ESP32_ULP_COPROC_ENABLED CONFIG_ULP_COPROC_ENABLED
|
||||
CONFIG_ESP32_ULP_COPROC_RESERVE_MEM CONFIG_ULP_COPROC_RESERVE_MEM
|
||||
CONFIG_ESP32_TIME_SYSCALL_USE_RTC_FRC1 CONFIG_ESP32_TIME_SYSCALL_USE_RTC_HRT
|
||||
CONFIG_ESP32_TIME_SYSCALL_USE_FRC1 CONFIG_ESP32_TIME_SYSCALL_USE_HRT
|
||||
|
||||
# SPI RAM config
|
||||
CONFIG_WIFI_LWIP_ALLOCATION_FROM_SPIRAM_FIRST CONFIG_SPIRAM_TRY_ALLOCATE_WIFI_LWIP
|
||||
|
||||
Reference in New Issue
Block a user