From 13cec981dff63b6331d93604b2d175946e281cd0 Mon Sep 17 00:00:00 2001 From: Darian Leung Date: Sat, 17 Dec 2022 00:37:37 +0800 Subject: [PATCH] esp_pm: Fix build error when CONFIG_PM_PROFILING is enabled --- components/esp_pm/pm_impl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/esp_pm/pm_impl.c b/components/esp_pm/pm_impl.c index 69f84f074e..463c4be747 100644 --- a/components/esp_pm/pm_impl.c +++ b/components/esp_pm/pm_impl.c @@ -646,7 +646,7 @@ void IRAM_ATTR vApplicationSleep( TickType_t xExpectedIdleTime ) int64_t sleep_time_us = MIN(wakeup_delay_us, time_until_next_alarm); 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); -#ifdef CONFIG_PM_TRACE +#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