Skip to content

Commit 6be09eb

Browse files
change(pm): replace SOC_CLK_RC32K_NOT_TO_USE with CONFIG_ESP_CLK_RC32K_NOT_TO_USE
1 parent 3b6f8b1 commit 6be09eb

File tree

8 files changed

+15
-16
lines changed

8 files changed

+15
-16
lines changed

components/esp_hw_support/Kconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,4 +273,13 @@ menu "Hardware Settings"
273273
config ESP_SPI_BUS_LOCK_FUNCS_IN_IRAM
274274
bool
275275
default n
276+
277+
config ESP_CLK_RC32K_NOT_TO_USE
278+
bool
279+
default y if IDF_TARGET_ESP32C5 || IDF_TARGET_ESP32C61
280+
default n
281+
help
282+
Due to the poor low-temperature characteristics of
283+
RC32K (it cannot operate below -40 degrees Celsius),
284+
please avoid using it whenever possible
276285
endmenu

components/esp_hw_support/modem_clock.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -423,15 +423,15 @@ void modem_clock_select_lp_clock_source(periph_module_t module, modem_clock_lpcl
423423
esp_sleep_pd_domain_t pd_domain = (esp_sleep_pd_domain_t) (
424424
(last_src == MODEM_CLOCK_LPCLK_SRC_RC_FAST) ? ESP_PD_DOMAIN_RC_FAST :
425425
(last_src == MODEM_CLOCK_LPCLK_SRC_MAIN_XTAL) ? ESP_PD_DOMAIN_XTAL :
426-
#if !SOC_CLK_RC32K_NOT_TO_USE
426+
#if !CONFIG_ESP_CLK_RC32K_NOT_TO_USE
427427
(last_src == MODEM_CLOCK_LPCLK_SRC_RC32K) ? ESP_PD_DOMAIN_RC32K :
428428
#endif
429429
(last_src == MODEM_CLOCK_LPCLK_SRC_XTAL32K) ? ESP_PD_DOMAIN_XTAL32K :
430430
ESP_PD_DOMAIN_MAX);
431431
esp_sleep_pd_domain_t pu_domain = (esp_sleep_pd_domain_t) (
432432
(src == MODEM_CLOCK_LPCLK_SRC_RC_FAST) ? ESP_PD_DOMAIN_RC_FAST :
433433
(src == MODEM_CLOCK_LPCLK_SRC_MAIN_XTAL) ? ESP_PD_DOMAIN_XTAL :
434-
#if !SOC_CLK_RC32K_NOT_TO_USE
434+
#if !CONFIG_ESP_CLK_RC32K_NOT_TO_USE
435435
(src == MODEM_CLOCK_LPCLK_SRC_RC32K) ? ESP_PD_DOMAIN_RC32K :
436436
#endif
437437
(src == MODEM_CLOCK_LPCLK_SRC_XTAL32K) ? ESP_PD_DOMAIN_XTAL32K :
@@ -486,7 +486,7 @@ void modem_clock_deselect_lp_clock_source(periph_module_t module)
486486
esp_sleep_pd_domain_t pd_domain = (esp_sleep_pd_domain_t) (
487487
(last_src == MODEM_CLOCK_LPCLK_SRC_RC_FAST) ? ESP_PD_DOMAIN_RC_FAST :
488488
(last_src == MODEM_CLOCK_LPCLK_SRC_MAIN_XTAL) ? ESP_PD_DOMAIN_XTAL :
489-
#if !SOC_CLK_RC32K_NOT_TO_USE
489+
#if !CONFIG_ESP_CLK_RC32K_NOT_TO_USE
490490
(last_src == MODEM_CLOCK_LPCLK_SRC_RC32K) ? ESP_PD_DOMAIN_RC32K :
491491
#endif
492492
(last_src == MODEM_CLOCK_LPCLK_SRC_XTAL32K) ? ESP_PD_DOMAIN_XTAL32K :

components/esp_hw_support/port/esp32c61/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ if(NOT BOOTLOADER_BUILD)
1717

1818
endif()
1919

20-
# TODO: [ESP32C61] IDF-9250
20+
# TODO: [ESP32C61] IDF-9304
2121
if(CONFIG_IDF_TARGET_ESP32C61)
2222
list(REMOVE_ITEM srcs
2323
"sar_periph_ctrl.c"

components/esp_hw_support/sleep_modes.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -709,7 +709,7 @@ FORCE_INLINE_ATTR void misc_modules_wake_prepare(uint32_t pd_flags)
709709
#if SOC_USB_SERIAL_JTAG_SUPPORTED && !SOC_USB_SERIAL_JTAG_SUPPORT_LIGHT_SLEEP
710710
sleep_console_usj_pad_restore();
711711
#endif
712-
#if !CONFIG_IDF_TARGET_ESP32C61
712+
#if !CONFIG_IDF_TARGET_ESP32C61 // TODO: IDF-9304
713713
sar_periph_ctrl_power_enable();
714714
#endif
715715
#if CONFIG_PM_POWER_DOWN_CPU_IN_LIGHT_SLEEP && SOC_PM_CPU_RETENTION_BY_RTCCNTL
@@ -2363,7 +2363,7 @@ static uint32_t get_power_down_flags(void)
23632363
}
23642364
#endif
23652365
#if SOC_PM_SUPPORT_RC32K_PD
2366-
#if !SOC_CLK_RC32K_NOT_TO_USE
2366+
#if !CONFIG_ESP_CLK_RC32K_NOT_TO_USE
23672367
if (s_config.domain[ESP_PD_DOMAIN_RC32K].pd_option != ESP_PD_OPTION_ON) {
23682368
pd_flags |= PMU_SLEEP_PD_RC32K;
23692369
}

components/soc/esp32c5/include/soc/Kconfig.soc_caps.in

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1359,10 +1359,6 @@ config SOC_CLK_LP_FAST_SUPPORT_XTAL
13591359
bool
13601360
default y
13611361

1362-
config SOC_CLK_RC32K_NOT_TO_USE
1363-
bool
1364-
default y
1365-
13661362
config SOC_RCC_IS_INDEPENDENT
13671363
bool
13681364
default y

components/soc/esp32c5/include/soc/soc_caps.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,6 @@
579579
#define SOC_CLK_XTAL32K_SUPPORTED (1) /*!< Support to connect an external low frequency crystal */
580580
#define SOC_CLK_OSC_SLOW_SUPPORTED (1) /*!< Support to connect an external oscillator, not a crystal */
581581
#define SOC_CLK_LP_FAST_SUPPORT_XTAL (1) /*!< Support XTAL clock as the LP_FAST clock source */
582-
#define SOC_CLK_RC32K_NOT_TO_USE (1) /*!< Due to the poor low-temperature characteristics of RC32K (it cannot operate below -40 degrees Celsius), please avoid using it whenever possible. */
583582
#define SOC_RCC_IS_INDEPENDENT 1 /*!< Reset and Clock Control is independent, thanks to the PCR registers */
584583

585584
/*-------------------------- Temperature Sensor CAPS -------------------------------------*/

components/soc/esp32c61/include/soc/Kconfig.soc_caps.in

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -895,10 +895,6 @@ config SOC_CLK_LP_FAST_SUPPORT_XTAL
895895
bool
896896
default y
897897

898-
config SOC_CLK_RC32K_NOT_TO_USE
899-
bool
900-
default y
901-
902898
config SOC_RCC_IS_INDEPENDENT
903899
bool
904900
default y

components/soc/esp32c61/include/soc/soc_caps.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,6 @@
453453
#define SOC_CLK_XTAL32K_SUPPORTED (1) /*!< Support to connect an external low frequency crystal */
454454
#define SOC_CLK_OSC_SLOW_SUPPORTED (1) /*!< Support to connect an external oscillator, not a crystal */
455455
#define SOC_CLK_LP_FAST_SUPPORT_XTAL (1) /*!< Support XTAL clock as the LP_FAST clock source */
456-
#define SOC_CLK_RC32K_NOT_TO_USE (1) /*!< Due to the poor low-temperature characteristics of RC32K (it cannot operate below -40 degrees Celsius), please avoid using it whenever possible. */
457456
#define SOC_RCC_IS_INDEPENDENT 1 /*!< Reset and Clock Control is independent, thanks to the PCR registers */
458457

459458
/*-------------------------- Temperature Sensor CAPS -------------------------------------*/

0 commit comments

Comments
 (0)