mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 03:00:34 +03:00
fix(clk): add an inevitable kconfig option to be selected to use rc32k
This commit is contained in:
@@ -16,10 +16,6 @@ if(${target} STREQUAL "esp32c6")
|
||||
list(APPEND priv_requires hal)
|
||||
endif()
|
||||
|
||||
if(CONFIG_RTC_CLK_SRC_INT_RC32K)
|
||||
message(WARNING "Internal RC32K clock is unstable at extreme temperatures and is not recommended for use.")
|
||||
endif()
|
||||
|
||||
set(srcs "cpu.c" "port/${IDF_TARGET}/esp_cpu_intr.c" "esp_memory_utils.c" "port/${IDF_TARGET}/cpu_region_protect.c")
|
||||
if(NOT BOOTLOADER_BUILD)
|
||||
list(APPEND srcs "esp_clk.c"
|
||||
|
||||
@@ -13,12 +13,18 @@ choice RTC_CLK_SRC
|
||||
bool "External 32kHz oscillator at 32K_XP pin"
|
||||
select ESP_SYSTEM_RTC_EXT_OSC
|
||||
config RTC_CLK_SRC_INT_RC32K
|
||||
bool "Internal 32kHz RC oscillator"
|
||||
bool "Internal 32kHz RC oscillator (NOT RECOMMENDED TO USE, READ DOCS FIRST)"
|
||||
depends on RTC_CLK_SRC_USE_DANGEROUS_RC32K_ALLOWED
|
||||
help
|
||||
Internal RC32K clock is unstable at extreme temperatures and is not recommended for use.
|
||||
To be able to select this option, please select `RTC_CLK_SRC_USE_DANGEROUS_RC32K_ALLOWED` first.
|
||||
This option will be removed in IDF v6.0.
|
||||
endchoice
|
||||
|
||||
config RTC_CLK_SRC_USE_DANGEROUS_RC32K_ALLOWED
|
||||
bool "Confirm to use the unrecommended 32 kHz RC oscillator (READ DOCS FIRST)"
|
||||
help
|
||||
Internal RC32K clock is unstable at extreme temperatures and is not recommended for use.
|
||||
|
||||
config RTC_CLK_CAL_CYCLES
|
||||
int "Number of cycles for RTC_SLOW_CLK calibration"
|
||||
default 3000 if RTC_CLK_SRC_EXT_CRYS || RTC_CLK_SRC_EXT_OSC || RTC_CLK_SRC_INT_RC32K
|
||||
|
||||
@@ -12,18 +12,13 @@ choice RTC_CLK_SRC
|
||||
config RTC_CLK_SRC_EXT_OSC
|
||||
bool "External 32kHz oscillator at 32K_XP pin"
|
||||
select ESP_SYSTEM_RTC_EXT_OSC
|
||||
config RTC_CLK_SRC_INT_RC32K
|
||||
bool "Internal 32kHz RC oscillator"
|
||||
help
|
||||
Internal RC32K clock is unstable at extreme temperatures and is not recommended for use.
|
||||
This option will be removed in IDF v6.0.
|
||||
endchoice
|
||||
|
||||
config RTC_CLK_CAL_CYCLES
|
||||
int "Number of cycles for RTC_SLOW_CLK calibration"
|
||||
default 3000 if RTC_CLK_SRC_EXT_CRYS || RTC_CLK_SRC_EXT_OSC || RTC_CLK_SRC_INT_RC32K
|
||||
default 3000 if RTC_CLK_SRC_EXT_CRYS || RTC_CLK_SRC_EXT_OSC
|
||||
default 1024 if RTC_CLK_SRC_INT_RC
|
||||
range 0 8190 if RTC_CLK_SRC_EXT_CRYS || RTC_CLK_SRC_EXT_OSC || RTC_CLK_SRC_INT_RC32K
|
||||
range 0 8190 if RTC_CLK_SRC_EXT_CRYS || RTC_CLK_SRC_EXT_OSC
|
||||
range 0 32766 if RTC_CLK_SRC_INT_RC
|
||||
help
|
||||
When the startup code initializes RTC_SLOW_CLK, it can perform
|
||||
|
||||
@@ -9,18 +9,13 @@ choice RTC_CLK_SRC
|
||||
config RTC_CLK_SRC_EXT_CRYS
|
||||
bool "External 32kHz crystal"
|
||||
select ESP_SYSTEM_RTC_EXT_XTAL
|
||||
config RTC_CLK_SRC_INT_RC32K
|
||||
bool "Internal 32kHz RC oscillator"
|
||||
help
|
||||
Internal RC32K clock is unstable at extreme temperatures and is not recommended for use.
|
||||
This option will be removed in IDF v6.0.
|
||||
endchoice
|
||||
|
||||
config RTC_CLK_CAL_CYCLES
|
||||
int "Number of cycles for RTC_SLOW_CLK calibration"
|
||||
default 3000 if RTC_CLK_SRC_EXT_CRYS || RTC_CLK_SRC_INT_RC32K
|
||||
default 3000 if RTC_CLK_SRC_EXT_CRYS
|
||||
default 1024 if RTC_CLK_SRC_INT_RC
|
||||
range 0 8190 if RTC_CLK_SRC_EXT_CRYS || RTC_CLK_SRC_INT_RC32K
|
||||
range 0 8190 if RTC_CLK_SRC_EXT_CRYS
|
||||
range 0 32766 if RTC_CLK_SRC_INT_RC
|
||||
help
|
||||
When the startup code initializes RTC_SLOW_CLK, it can perform
|
||||
|
||||
Reference in New Issue
Block a user