mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
light sleep: supported SoC TOP domain powered down
This commit is contained in:
parent
6e307c04a3
commit
aec3f6db1d
@ -61,6 +61,9 @@ typedef enum {
|
|||||||
#endif
|
#endif
|
||||||
#if SOC_PM_SUPPORT_VDDSDIO_PD
|
#if SOC_PM_SUPPORT_VDDSDIO_PD
|
||||||
ESP_PD_DOMAIN_VDDSDIO, //!< VDD_SDIO
|
ESP_PD_DOMAIN_VDDSDIO, //!< VDD_SDIO
|
||||||
|
#endif
|
||||||
|
#if SOC_PM_SUPPORT_TOP_PD
|
||||||
|
ESP_PD_DOMAIN_TOP, //!< SoC TOP
|
||||||
#endif
|
#endif
|
||||||
ESP_PD_DOMAIN_MAX //!< Number of domains
|
ESP_PD_DOMAIN_MAX //!< Number of domains
|
||||||
} esp_sleep_pd_domain_t;
|
} esp_sleep_pd_domain_t;
|
||||||
|
@ -76,6 +76,8 @@
|
|||||||
#include "esp32c6/rom/rtc.h"
|
#include "esp32c6/rom/rtc.h"
|
||||||
#include "hal/lp_timer_hal.h"
|
#include "hal/lp_timer_hal.h"
|
||||||
#include "esp_private/esp_pmu.h"
|
#include "esp_private/esp_pmu.h"
|
||||||
|
#include "esp_private/sleep_peripheral.h"
|
||||||
|
#include "esp_private/sleep_clock.h"
|
||||||
#elif CONFIG_IDF_TARGET_ESP32H2
|
#elif CONFIG_IDF_TARGET_ESP32H2
|
||||||
#include "esp32h2/rom/rtc.h"
|
#include "esp32h2/rom/rtc.h"
|
||||||
#include "esp32h2/rom/cache.h"
|
#include "esp32h2/rom/cache.h"
|
||||||
@ -1455,6 +1457,12 @@ static uint32_t get_power_down_flags(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if SOC_PM_SUPPORT_TOP_PD
|
||||||
|
if (!cpu_domain_pd_allowed() || !clock_domain_pd_allowed() || !peripheral_domain_pd_allowed()) {
|
||||||
|
s_config.domain[ESP_PD_DOMAIN_TOP].pd_option = ESP_PD_OPTION_ON;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_IDF_TARGET_ESP32
|
#ifdef CONFIG_IDF_TARGET_ESP32
|
||||||
s_config.domain[ESP_PD_DOMAIN_XTAL].pd_option = ESP_PD_OPTION_OFF;
|
s_config.domain[ESP_PD_DOMAIN_XTAL].pd_option = ESP_PD_OPTION_OFF;
|
||||||
#endif
|
#endif
|
||||||
@ -1512,6 +1520,11 @@ static uint32_t get_power_down_flags(void)
|
|||||||
if (s_config.domain[ESP_PD_DOMAIN_XTAL].pd_option != ESP_PD_OPTION_ON) {
|
if (s_config.domain[ESP_PD_DOMAIN_XTAL].pd_option != ESP_PD_OPTION_ON) {
|
||||||
pd_flags |= RTC_SLEEP_PD_XTAL;
|
pd_flags |= RTC_SLEEP_PD_XTAL;
|
||||||
}
|
}
|
||||||
|
#if SOC_PM_SUPPORT_TOP_PD
|
||||||
|
if (s_config.domain[ESP_PD_DOMAIN_TOP].pd_option != ESP_PD_OPTION_ON) {
|
||||||
|
pd_flags |= PMU_SLEEP_PD_TOP;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
#if SOC_PM_SUPPORT_VDDSDIO_PD
|
#if SOC_PM_SUPPORT_VDDSDIO_PD
|
||||||
if (s_config.domain[ESP_PD_DOMAIN_VDDSDIO].pd_option != ESP_PD_OPTION_ON) {
|
if (s_config.domain[ESP_PD_DOMAIN_VDDSDIO].pd_option != ESP_PD_OPTION_ON) {
|
||||||
pd_flags |= RTC_SLEEP_PD_VDDSDIO;
|
pd_flags |= RTC_SLEEP_PD_VDDSDIO;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user