forked from espressif/esp-idf
Merge branch 'fix/fix_pm_trace_rtc_domain_keeping_v5.2' into 'release/v5.2'
fix(esp_pm): enable RTC_PERIPH domain once in esp_pm_trace_init (v5.2) See merge request espressif/esp-idf!35999
This commit is contained in:
@ -809,10 +809,6 @@ void IRAM_ATTR vApplicationSleep( TickType_t xExpectedIdleTime )
|
|||||||
#endif
|
#endif
|
||||||
if (sleep_time_us >= configEXPECTED_IDLE_TIME_BEFORE_SLEEP * portTICK_PERIOD_MS * 1000LL) {
|
if (sleep_time_us >= configEXPECTED_IDLE_TIME_BEFORE_SLEEP * portTICK_PERIOD_MS * 1000LL) {
|
||||||
esp_sleep_enable_timer_wakeup(sleep_time_us - LIGHT_SLEEP_EARLY_WAKEUP_US);
|
esp_sleep_enable_timer_wakeup(sleep_time_us - LIGHT_SLEEP_EARLY_WAKEUP_US);
|
||||||
#if CONFIG_PM_TRACE && SOC_PM_SUPPORT_RTC_PERIPH_PD
|
|
||||||
/* to force tracing GPIOs to keep state */
|
|
||||||
esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_PERIPH, ESP_PD_OPTION_ON);
|
|
||||||
#endif
|
|
||||||
/* Enter sleep */
|
/* Enter sleep */
|
||||||
ESP_PM_TRACE_ENTER(SLEEP, core_id);
|
ESP_PM_TRACE_ENTER(SLEEP, core_id);
|
||||||
int64_t sleep_start = esp_timer_get_time();
|
int64_t sleep_start = esp_timer_get_time();
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
/*
|
/*
|
||||||
* SPDX-FileCopyrightText: 2016-2023 Espressif Systems (Shanghai) CO LTD
|
* SPDX-FileCopyrightText: 2016-2024 Espressif Systems (Shanghai) CO LTD
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "esp_attr.h"
|
#include "esp_attr.h"
|
||||||
|
#include "esp_sleep.h"
|
||||||
#include "esp_private/pm_trace.h"
|
#include "esp_private/pm_trace.h"
|
||||||
#include "driver/gpio.h"
|
#include "driver/gpio.h"
|
||||||
#include "soc/soc.h"
|
#include "soc/soc.h"
|
||||||
@ -55,6 +56,10 @@ void esp_pm_trace_init(void)
|
|||||||
}
|
}
|
||||||
gpio_set_direction(io - 1, GPIO_MODE_OUTPUT);
|
gpio_set_direction(io - 1, GPIO_MODE_OUTPUT);
|
||||||
}
|
}
|
||||||
|
#if SOC_PM_SUPPORT_RTC_PERIPH_PD
|
||||||
|
/* to force tracing GPIOs to keep state */
|
||||||
|
esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_PERIPH, ESP_PD_OPTION_ON);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void IRAM_ATTR esp_pm_trace_enter(esp_pm_trace_event_t event, int core_id)
|
void IRAM_ATTR esp_pm_trace_enter(esp_pm_trace_event_t event, int core_id)
|
||||||
|
Reference in New Issue
Block a user