mirror of
https://github.com/espressif/esp-idf
synced 2025-03-09 09:09:10 -04:00
Merge branch 'fix/fix_sleep_modes_breaking_change' into 'master'
fix(esp_hw_support): warning instead of error when enabling uart/gpio wakeup in pd_top sleep See merge request espressif/esp-idf!37293
This commit is contained in:
commit
714e626dc2
@ -481,7 +481,6 @@ esp_err_t esp_deep_sleep_enable_gpio_wakeup(uint64_t gpio_pin_mask, esp_deepslee
|
||||
* @return
|
||||
* - ESP_OK on success
|
||||
* - ESP_ERR_INVALID_STATE if wakeup triggers conflict
|
||||
* - ESP_ERR_NOT_SUPPORTED if GPIO wakeup source is not available
|
||||
*/
|
||||
esp_err_t esp_sleep_enable_gpio_wakeup(void);
|
||||
|
||||
@ -501,7 +500,6 @@ esp_err_t esp_sleep_enable_gpio_wakeup(void);
|
||||
* @return
|
||||
* - ESP_OK on success
|
||||
* - ESP_ERR_INVALID_ARG if wakeup from given UART is not supported
|
||||
* - ESP_ERR_NOT_SUPPORTED if UART wakeup source is not available
|
||||
*/
|
||||
esp_err_t esp_sleep_enable_uart_wakeup(int uart_num);
|
||||
|
||||
|
@ -2054,8 +2054,7 @@ esp_err_t esp_deep_sleep_enable_gpio_wakeup(uint64_t gpio_pin_mask, esp_deepslee
|
||||
esp_err_t esp_sleep_enable_gpio_wakeup(void)
|
||||
{
|
||||
#if CONFIG_PM_POWER_DOWN_PERIPHERAL_IN_LIGHT_SLEEP
|
||||
ESP_LOGE(TAG, "%s wakeup source is not available if the peripheral power domain is powered down in sleep", "GPIO");
|
||||
return ESP_ERR_NOT_SUPPORTED;
|
||||
ESP_LOGW(TAG, "%s wakeup source is not available if the peripheral power domain is powered down in sleep", "GPIO");
|
||||
#endif
|
||||
#if CONFIG_IDF_TARGET_ESP32
|
||||
if (s_config.wakeup_triggers & (RTC_TOUCH_TRIG_EN | RTC_ULP_TRIG_EN)) {
|
||||
@ -2070,8 +2069,7 @@ esp_err_t esp_sleep_enable_gpio_wakeup(void)
|
||||
esp_err_t esp_sleep_enable_uart_wakeup(int uart_num)
|
||||
{
|
||||
#if CONFIG_PM_POWER_DOWN_PERIPHERAL_IN_LIGHT_SLEEP
|
||||
ESP_LOGE(TAG, "%s wakeup source is not available if the peripheral power domain is powered down in sleep", "UART");
|
||||
return ESP_ERR_NOT_SUPPORTED;
|
||||
ESP_LOGW(TAG, "%s wakeup source is not available if the peripheral power domain is powered down in sleep", "UART");
|
||||
#endif
|
||||
if (uart_num == UART_NUM_0) {
|
||||
s_config.wakeup_triggers |= RTC_UART0_TRIG_EN;
|
||||
|
@ -146,7 +146,7 @@ menu "Power Management"
|
||||
select PM_POWER_DOWN_CPU_IN_LIGHT_SLEEP if !SOC_CPU_IN_TOP_DOMAIN
|
||||
default n #TODO: enable by default if periph init/deinit management supported (WIFI-5252)
|
||||
help
|
||||
If enabled, digital peripherals will be powered down in light sleep, all related peripherals will
|
||||
If enabled, digital peripherals will try to powered down in light sleep, then all related peripherals will
|
||||
not be available during sleep, including wake-up sources from the peripherals (For detailed availability
|
||||
information, see the note of the corresponding wakeup source enable function).
|
||||
The chip will automatically save/restore register context during sleep/wakeup to make the upper layer
|
||||
@ -171,6 +171,14 @@ menu "Power Management"
|
||||
of freertos to not be compensated correctly when returning from sleep and cause the system to crash.
|
||||
To avoid this, you can increase FREERTOS_IDLE_TIME_BEFORE_SLEEP threshold in menuconfig.
|
||||
|
||||
Note3: Enabling this option does not necessarily mean that the peripheral power domain will be
|
||||
turned down during sleep. The control priority of `esp_sleep_pd_config` is higher than this option,
|
||||
user code can still prevent the peripheral power domain from powering down during sleep by
|
||||
`esp_sleep_pd_config(ESP_PD_DOMAIN_TOP, ESP_PD_OPTION_ON)`. In addition, whether the peripheral power
|
||||
domain is powered down during sleep also depends on the sleep working strategy selected by the driver.
|
||||
If any module belonging to the peripheral power domain chooses not to be powered down during sleep,
|
||||
then the peripheral power domain will not be powered off either.
|
||||
|
||||
config PM_UPDATE_CCOMPARE_HLI_WORKAROUND
|
||||
bool
|
||||
default y if PM_ENABLE && BTDM_CTRL_HLI
|
||||
|
Loading…
x
Reference in New Issue
Block a user