Skip to content

Commit 86a49de

Browse files
committed
Merge branch 'fix/fix_esp32p4_kconfig_pd_cpu_dependcy_error_v5.3' into 'release/v5.3'
fix(esp_pm): fix esp32p4 kconfig pd cpu dependency error (v5.3) See merge request espressif/esp-idf!30794
2 parents 51b6d16 + 64c0620 commit 86a49de

File tree

20 files changed

+85
-73
lines changed

20 files changed

+85
-73
lines changed

components/esp_hw_support/include/esp_private/sleep_cpu.h

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#include <stdbool.h>
1010
#include "sdkconfig.h"
1111
#include "esp_err.h"
12+
#include "esp_sleep.h"
1213
#include "soc/soc_caps.h"
1314

1415
#ifdef __cplusplus
@@ -21,7 +22,7 @@ extern "C" {
2122
* This file contains declarations of cpu retention related functions in light sleep mode.
2223
*/
2324

24-
#if CONFIG_PM_POWER_DOWN_CPU_IN_LIGHT_SLEEP || SOC_PM_SUPPORT_CPU_PD
25+
#if ESP_SLEEP_POWER_DOWN_CPU || SOC_PM_SUPPORT_CPU_PD
2526
/**
2627
* @brief Whether to allow the cpu power domain to be powered off.
2728
*
@@ -31,7 +32,7 @@ extern "C" {
3132
bool cpu_domain_pd_allowed(void);
3233
#endif
3334

34-
#if CONFIG_PM_POWER_DOWN_CPU_IN_LIGHT_SLEEP
35+
#if ESP_SLEEP_POWER_DOWN_CPU
3536
/**
3637
* @brief Configure the parameters of the CPU domain during the sleep process
3738
*
@@ -64,9 +65,9 @@ void sleep_disable_cpu_retention(void);
6465
esp_err_t esp_sleep_cpu_retention(uint32_t (*goto_sleep)(uint32_t, uint32_t, uint32_t, bool),
6566
uint32_t wakeup_opt, uint32_t reject_opt, uint32_t lslp_mem_inf_fpu, bool dslp);
6667
#endif // SOC_PM_CPU_RETENTION_BY_SW
67-
#endif // CONFIG_PM_POWER_DOWN_CPU_IN_LIGHT_SLEEP
68+
#endif // ESP_SLEEP_POWER_DOWN_CPU
6869

69-
#if !CONFIG_FREERTOS_UNICORE && CONFIG_PM_POWER_DOWN_CPU_IN_LIGHT_SLEEP
70+
#if !CONFIG_FREERTOS_UNICORE && ESP_SLEEP_POWER_DOWN_CPU
7071
/**
7172
* Do sleep prepare for other smp cores
7273
*/
@@ -77,13 +78,11 @@ void sleep_smp_cpu_sleep_prepare(void);
7778
*/
7879
void sleep_smp_cpu_wakeup_prepare(void);
7980

80-
#if CONFIG_PM_POWER_DOWN_CPU_IN_LIGHT_SLEEP
8181
/**
8282
* Notify the other core that this sleep does not require retention.
8383
*/
8484
void esp_sleep_cpu_skip_retention(void);
85-
#endif // CONFIG_PM_POWER_DOWN_CPU_IN_LIGHT_SLEEP
86-
#endif // !CONFIG_FREERTOS_UNICORE && CONFIG_PM_POWER_DOWN_CPU_IN_LIGHT_SLEEP
85+
#endif // !CONFIG_FREERTOS_UNICORE && ESP_SLEEP_POWER_DOWN_CPU
8786

8887
#ifdef __cplusplus
8988
}

components/esp_hw_support/include/esp_sleep.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD
2+
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
@@ -133,6 +133,8 @@ enum {
133133
ESP_ERR_SLEEP_TOO_SHORT_SLEEP_DURATION = ESP_ERR_INVALID_ARG,
134134
};
135135

136+
#define ESP_SLEEP_POWER_DOWN_CPU (CONFIG_PM_POWER_DOWN_CPU_IN_LIGHT_SLEEP || (SOC_CPU_IN_TOP_DOMAIN && CONFIG_PM_POWER_DOWN_PERIPHERAL_IN_LIGHT_SLEEP))
137+
136138
/**
137139
* @brief Disable wakeup source
138140
*
@@ -713,7 +715,7 @@ void esp_default_wake_deep_sleep(void);
713715
*/
714716
void esp_deep_sleep_disable_rom_logging(void);
715717

716-
#if CONFIG_PM_POWER_DOWN_CPU_IN_LIGHT_SLEEP
718+
#if ESP_SLEEP_POWER_DOWN_CPU
717719

718720
#if SOC_PM_CPU_RETENTION_BY_RTCCNTL
719721
/**
@@ -752,7 +754,7 @@ esp_err_t esp_sleep_cpu_retention_init(void);
752754
* Release system retention memory.
753755
*/
754756
esp_err_t esp_sleep_cpu_retention_deinit(void);
755-
#endif // CONFIG_PM_POWER_DOWN_CPU_IN_LIGHT_SLEEP
757+
#endif // ESP_SLEEP_POWER_DOWN_CPU
756758

757759
/**
758760
* @brief Configure to isolate all GPIO pins in sleep state

components/esp_hw_support/lowpower/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ endif()
44

55
set(srcs)
66

7-
if(CONFIG_PM_POWER_DOWN_CPU_IN_LIGHT_SLEEP)
7+
if(CONFIG_PM_POWER_DOWN_CPU_IN_LIGHT_SLEEP OR
8+
(CONFIG_SOC_CPU_IN_TOP_DOMAIN AND CONFIG_PM_POWER_DOWN_PERIPHERAL_IN_LIGHT_SLEEP))
89
list(APPEND srcs "cpu_retention/port/${target}/sleep_cpu.c")
910
if(CONFIG_SOC_PM_CPU_RETENTION_BY_SW)
1011
list(APPEND srcs "cpu_retention/port/${target}/sleep_cpu_asm.S")

components/esp_hw_support/lowpower/cpu_retention/port/esp32c3/sleep_cpu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ bool cpu_domain_pd_allowed(void)
102102

103103
esp_err_t sleep_cpu_configure(bool light_sleep_enable)
104104
{
105-
#if CONFIG_PM_POWER_DOWN_CPU_IN_LIGHT_SLEEP
105+
#if ESP_SLEEP_POWER_DOWN_CPU
106106
if (light_sleep_enable) {
107107
ESP_RETURN_ON_ERROR(esp_sleep_cpu_retention_init(), TAG, "Failed to enable CPU power down during light sleep.");
108108
} else {

components/esp_hw_support/lowpower/cpu_retention/port/esp32c5/sleep_cpu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ bool cpu_domain_pd_allowed(void)
489489

490490
esp_err_t sleep_cpu_configure(bool light_sleep_enable)
491491
{
492-
#if CONFIG_PM_POWER_DOWN_CPU_IN_LIGHT_SLEEP
492+
#if ESP_SLEEP_POWER_DOWN_CPU
493493
if (light_sleep_enable) {
494494
ESP_RETURN_ON_ERROR(esp_sleep_cpu_retention_init(), TAG, "Failed to enable CPU power down during light sleep.");
495495
} else {

components/esp_hw_support/lowpower/cpu_retention/port/esp32c6/sleep_cpu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@ bool cpu_domain_pd_allowed(void)
532532

533533
esp_err_t sleep_cpu_configure(bool light_sleep_enable)
534534
{
535-
#if CONFIG_PM_POWER_DOWN_CPU_IN_LIGHT_SLEEP
535+
#if ESP_SLEEP_POWER_DOWN_CPU
536536
if (light_sleep_enable) {
537537
ESP_RETURN_ON_ERROR(esp_sleep_cpu_retention_init(), TAG, "Failed to enable CPU power down during light sleep.");
538538
} else {

components/esp_hw_support/lowpower/cpu_retention/port/esp32h2/sleep_cpu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@ bool cpu_domain_pd_allowed(void)
532532

533533
esp_err_t sleep_cpu_configure(bool light_sleep_enable)
534534
{
535-
#if CONFIG_PM_POWER_DOWN_CPU_IN_LIGHT_SLEEP
535+
#if ESP_SLEEP_POWER_DOWN_CPU
536536
if (light_sleep_enable) {
537537
ESP_RETURN_ON_ERROR(esp_sleep_cpu_retention_init(), TAG, "Failed to enable CPU power down during light sleep.");
538538
} else {

components/esp_hw_support/lowpower/cpu_retention/port/esp32p4/sleep_cpu.c

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
#endif
4242

4343

44-
#if CONFIG_PM_POWER_DOWN_CPU_IN_LIGHT_SLEEP && !CONFIG_FREERTOS_UNICORE
44+
#if ESP_SLEEP_POWER_DOWN_CPU && !CONFIG_FREERTOS_UNICORE
4545
#include <stdatomic.h>
4646
#include "soc/hp_system_reg.h"
4747
typedef enum {
@@ -81,7 +81,7 @@ typedef struct {
8181
} retent;
8282
} sleep_cpu_retention_t;
8383

84-
static DRAM_ATTR __attribute__((unused)) sleep_cpu_retention_t s_cpu_retention;
84+
static TCM_DRAM_ATTR __attribute__((unused)) sleep_cpu_retention_t s_cpu_retention;
8585

8686
extern RvCoreCriticalSleepFrame *rv_core_critical_regs_frame[portNUM_PROCESSORS];
8787

@@ -162,7 +162,7 @@ static esp_err_t esp_sleep_cpu_retention_init_impl(void)
162162
s_cpu_retention.retent.clic_frame[core_id] = (cpu_domain_dev_sleep_frame_t *)frame;
163163
}
164164
}
165-
#if CONFIG_PM_POWER_DOWN_CPU_IN_LIGHT_SLEEP && !CONFIG_FREERTOS_UNICORE
165+
#if ESP_SLEEP_POWER_DOWN_CPU && !CONFIG_FREERTOS_UNICORE
166166
for (uint8_t core_id = 0; core_id < portNUM_PROCESSORS; ++core_id) {
167167
atomic_init(&s_smp_retention_state[core_id], SMP_IDLE);
168168
}
@@ -209,7 +209,7 @@ FORCE_INLINE_ATTR void restore_mstatus(uint32_t mstatus_val)
209209
RV_WRITE_CSR(mstatus, mstatus_val);
210210
}
211211

212-
static IRAM_ATTR RvCoreNonCriticalSleepFrame * rv_core_noncritical_regs_save(void)
212+
static TCM_IRAM_ATTR RvCoreNonCriticalSleepFrame * rv_core_noncritical_regs_save(void)
213213
{
214214
RvCoreNonCriticalSleepFrame *frame = s_cpu_retention.retent.non_critical_frame[esp_cpu_get_core_id()];
215215

@@ -277,7 +277,7 @@ static IRAM_ATTR RvCoreNonCriticalSleepFrame * rv_core_noncritical_regs_save(voi
277277
return frame;
278278
}
279279

280-
static IRAM_ATTR void rv_core_noncritical_regs_restore(void)
280+
static TCM_IRAM_ATTR void rv_core_noncritical_regs_restore(void)
281281
{
282282
RvCoreNonCriticalSleepFrame *frame = s_cpu_retention.retent.non_critical_frame[esp_cpu_get_core_id()];
283283

@@ -343,7 +343,7 @@ static IRAM_ATTR void rv_core_noncritical_regs_restore(void)
343343
RV_WRITE_CSR(mcycle, frame->mcycle);
344344
}
345345

346-
static IRAM_ATTR void cpu_domain_dev_regs_save(cpu_domain_dev_sleep_frame_t *frame)
346+
static TCM_IRAM_ATTR void cpu_domain_dev_regs_save(cpu_domain_dev_sleep_frame_t *frame)
347347
{
348348
assert(frame);
349349
cpu_domain_dev_regs_region_t *region = frame->region;
@@ -357,7 +357,7 @@ static IRAM_ATTR void cpu_domain_dev_regs_save(cpu_domain_dev_sleep_frame_t *fra
357357
}
358358
}
359359

360-
static IRAM_ATTR void cpu_domain_dev_regs_restore(cpu_domain_dev_sleep_frame_t *frame)
360+
static TCM_IRAM_ATTR void cpu_domain_dev_regs_restore(cpu_domain_dev_sleep_frame_t *frame)
361361
{
362362
assert(frame);
363363
cpu_domain_dev_regs_region_t *region = frame->region;
@@ -372,12 +372,12 @@ static IRAM_ATTR void cpu_domain_dev_regs_restore(cpu_domain_dev_sleep_frame_t *
372372
}
373373

374374
#if CONFIG_PM_CHECK_SLEEP_RETENTION_FRAME
375-
static IRAM_ATTR void update_retention_frame_crc(uint32_t *frame_ptr, uint32_t frame_check_size, uint32_t *frame_crc_ptr)
375+
static TCM_IRAM_ATTR void update_retention_frame_crc(uint32_t *frame_ptr, uint32_t frame_check_size, uint32_t *frame_crc_ptr)
376376
{
377377
*(frame_crc_ptr) = esp_crc32_le(0, (void *)frame_ptr, frame_check_size);
378378
}
379379

380-
static IRAM_ATTR void validate_retention_frame_crc(uint32_t *frame_ptr, uint32_t frame_check_size, uint32_t *frame_crc_ptr)
380+
static TCM_IRAM_ATTR void validate_retention_frame_crc(uint32_t *frame_ptr, uint32_t frame_check_size, uint32_t *frame_crc_ptr)
381381
{
382382
if(*(frame_crc_ptr) != esp_crc32_le(0, (void *)(frame_ptr), frame_check_size)){
383383
// resume uarts
@@ -399,7 +399,7 @@ extern RvCoreCriticalSleepFrame * rv_core_critical_regs_save(void);
399399
extern RvCoreCriticalSleepFrame * rv_core_critical_regs_restore(void);
400400
typedef uint32_t (* sleep_cpu_entry_cb_t)(uint32_t, uint32_t, uint32_t, bool);
401401

402-
static IRAM_ATTR esp_err_t do_cpu_retention(sleep_cpu_entry_cb_t goto_sleep,
402+
static TCM_IRAM_ATTR esp_err_t do_cpu_retention(sleep_cpu_entry_cb_t goto_sleep,
403403
uint32_t wakeup_opt, uint32_t reject_opt, uint32_t lslp_mem_inf_fpu, bool dslp)
404404
{
405405
uint8_t core_id = esp_cpu_get_core_id();
@@ -410,11 +410,11 @@ static IRAM_ATTR esp_err_t do_cpu_retention(sleep_cpu_entry_cb_t goto_sleep,
410410
esp_sleep_execute_event_callbacks(SLEEP_EVENT_SW_CPU_TO_MEM_END, (void *)0);
411411
#if CONFIG_PM_CHECK_SLEEP_RETENTION_FRAME
412412
/* Minus 2 * sizeof(long) is for bypass `pmufunc` and `frame_crc` field */
413-
update_retention_frame_crc((uint32_t*)frame, RV_SLEEP_CTX_FRMSZ - 2 * sizeof(long), (uint32_t *)(&frame->frame_crc));
413+
update_retention_frame_crc((uint32_t*)frame, RV_SLEEP_CTX_SZ1 - 2 * sizeof(long), (uint32_t *)(&frame->frame_crc));
414414
#endif
415415
REG_WRITE(RTC_SLEEP_WAKE_STUB_ADDR_REG, (uint32_t)rv_core_critical_regs_restore);
416416

417-
#if CONFIG_PM_POWER_DOWN_CPU_IN_LIGHT_SLEEP && !CONFIG_FREERTOS_UNICORE
417+
#if ESP_SLEEP_POWER_DOWN_CPU && !CONFIG_FREERTOS_UNICORE
418418
atomic_store(&s_smp_retention_state[core_id], SMP_BACKUP_DONE);
419419
while (atomic_load(&s_smp_retention_state[!core_id]) != SMP_BACKUP_DONE) {
420420
;
@@ -425,20 +425,20 @@ static IRAM_ATTR esp_err_t do_cpu_retention(sleep_cpu_entry_cb_t goto_sleep,
425425
}
426426
#if CONFIG_PM_CHECK_SLEEP_RETENTION_FRAME
427427
else {
428-
validate_retention_frame_crc((uint32_t*)frame, RV_SLEEP_CTX_FRMSZ - 2 * sizeof(long), (uint32_t *)(&frame->frame_crc));
428+
validate_retention_frame_crc((uint32_t*)frame, RV_SLEEP_CTX_SZ1 - 2 * sizeof(long), (uint32_t *)(&frame->frame_crc));
429429
}
430430
#endif
431431

432432
return pmu_sleep_finish();
433433
}
434434

435-
esp_err_t IRAM_ATTR esp_sleep_cpu_retention(uint32_t (*goto_sleep)(uint32_t, uint32_t, uint32_t, bool),
435+
esp_err_t TCM_IRAM_ATTR esp_sleep_cpu_retention(uint32_t (*goto_sleep)(uint32_t, uint32_t, uint32_t, bool),
436436
uint32_t wakeup_opt, uint32_t reject_opt, uint32_t lslp_mem_inf_fpu, bool dslp)
437437
{
438438
esp_sleep_execute_event_callbacks(SLEEP_EVENT_SW_CPU_TO_MEM_START, (void *)0);
439439
uint32_t mstatus = save_mstatus_and_disable_global_int();
440440
uint8_t core_id = esp_cpu_get_core_id();
441-
#if CONFIG_PM_POWER_DOWN_CPU_IN_LIGHT_SLEEP && !CONFIG_FREERTOS_UNICORE
441+
#if ESP_SLEEP_POWER_DOWN_CPU && !CONFIG_FREERTOS_UNICORE
442442
atomic_store(&s_smp_retention_state[core_id], SMP_BACKUP_START);
443443
#endif
444444
cpu_domain_dev_regs_save(s_cpu_retention.retent.clic_frame[core_id]);
@@ -457,7 +457,7 @@ esp_err_t IRAM_ATTR esp_sleep_cpu_retention(uint32_t (*goto_sleep)(uint32_t, uin
457457
validate_retention_frame_crc((uint32_t*)frame, sizeof(RvCoreNonCriticalSleepFrame) - sizeof(long), (uint32_t *)(&frame->frame_crc));
458458
#endif
459459

460-
#if CONFIG_PM_POWER_DOWN_CPU_IN_LIGHT_SLEEP && !CONFIG_FREERTOS_UNICORE
460+
#if ESP_SLEEP_POWER_DOWN_CPU && !CONFIG_FREERTOS_UNICORE
461461
// Start core1
462462
if (core_id == 0) {
463463
REG_SET_BIT(HP_SYS_CLKRST_SOC_CLK_CTRL0_REG, HP_SYS_CLKRST_REG_CORE1_CPU_CLK_EN);
@@ -472,7 +472,7 @@ esp_err_t IRAM_ATTR esp_sleep_cpu_retention(uint32_t (*goto_sleep)(uint32_t, uin
472472
cpu_domain_dev_regs_restore(s_cpu_retention.retent.clic_frame[core_id]);
473473
restore_mstatus(mstatus);
474474

475-
#if CONFIG_PM_POWER_DOWN_CPU_IN_LIGHT_SLEEP && !CONFIG_FREERTOS_UNICORE
475+
#if ESP_SLEEP_POWER_DOWN_CPU && !CONFIG_FREERTOS_UNICORE
476476
atomic_store(&s_smp_retention_state[core_id], SMP_RESTORE_DONE);
477477
#endif
478478
return err;
@@ -504,7 +504,7 @@ bool cpu_domain_pd_allowed(void)
504504

505505
esp_err_t sleep_cpu_configure(bool light_sleep_enable)
506506
{
507-
#if CONFIG_PM_POWER_DOWN_CPU_IN_LIGHT_SLEEP
507+
#if ESP_SLEEP_POWER_DOWN_CPU
508508
if (light_sleep_enable) {
509509
ESP_RETURN_ON_ERROR(esp_sleep_cpu_retention_init(), TAG, "Failed to enable CPU power down during light sleep.");
510510
} else {
@@ -515,7 +515,7 @@ esp_err_t sleep_cpu_configure(bool light_sleep_enable)
515515
}
516516

517517
#if !CONFIG_FREERTOS_UNICORE
518-
#if CONFIG_PM_POWER_DOWN_CPU_IN_LIGHT_SLEEP
518+
#if ESP_SLEEP_POWER_DOWN_CPU
519519
static TCM_IRAM_ATTR void smp_core_do_retention(void)
520520
{
521521
uint8_t core_id = esp_cpu_get_core_id();
@@ -572,14 +572,14 @@ static TCM_IRAM_ATTR void smp_core_do_retention(void)
572572
}
573573

574574

575-
IRAM_ATTR void esp_sleep_cpu_skip_retention(void) {
575+
TCM_IRAM_ATTR void esp_sleep_cpu_skip_retention(void) {
576576
atomic_store(&s_smp_retention_state[esp_cpu_get_core_id()], SMP_SKIP_RETENTION);
577577
}
578578
#endif
579579

580580
void sleep_smp_cpu_sleep_prepare(void)
581581
{
582-
#if CONFIG_PM_POWER_DOWN_CPU_IN_LIGHT_SLEEP
582+
#if ESP_SLEEP_POWER_DOWN_CPU
583583
while (atomic_load(&s_smp_retention_state[!esp_cpu_get_core_id()]) != SMP_IDLE) {
584584
;
585585
}
@@ -591,7 +591,7 @@ void sleep_smp_cpu_sleep_prepare(void)
591591

592592
void sleep_smp_cpu_wakeup_prepare(void)
593593
{
594-
#if CONFIG_PM_POWER_DOWN_CPU_IN_LIGHT_SLEEP
594+
#if ESP_SLEEP_POWER_DOWN_CPU
595595
uint8_t core_id = esp_cpu_get_core_id();
596596
if (atomic_load(&s_smp_retention_state[core_id]) == SMP_RESTORE_DONE) {
597597
while (atomic_load(&s_smp_retention_state[!core_id]) != SMP_RESTORE_DONE) {

components/esp_hw_support/lowpower/cpu_retention/port/esp32p4/sleep_cpu_asm.S

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -117,28 +117,6 @@ rv_core_critical_regs_save:
117117
mv t3, t0
118118
csrr t0, mscratch
119119
sw t0, RV_SLP_CTX_T0(t3)
120-
121-
/* writeback dcache is required here!!! */
122-
la t0, CACHE_SYNC_MAP_REG
123-
li t1, 0x10 /* map l1 dcache */
124-
sw t1, 0x0(t0) /* set EXTMEM_CACHE_SYNC_MAP_REG bit 4 */
125-
la t2, CACHE_SYNC_ADDR_REG
126-
sw zero, 0x0(t2) /* clear EXTMEM_CACHE_SYNC_ADDR_REG */
127-
la t0, CACHE_SYNC_SIZE_REG
128-
sw zero, 0x0(t0) /* clear EXTMEM_CACHE_SYNC_SIZE_REG */
129-
130-
la t1, CACHE_SYNC_CTRL_REG
131-
lw t2, 0x0(t1)
132-
ori t2, t2, 0x4
133-
sw t2, 0x0(t1)
134-
135-
li t0, 0x10 /* SYNC_DONE bit */
136-
wait_sync_done:
137-
lw t2, 0x0(t1)
138-
and t2, t0, t2
139-
beqz t2, wait_sync_done
140-
141-
lw t0, RV_SLP_CTX_T0(t3)
142120
lw t1, RV_SLP_CTX_T1(t3)
143121
lw t2, RV_SLP_CTX_T2(t3)
144122
lw t3, RV_SLP_CTX_T3(t3)

components/esp_hw_support/lowpower/cpu_retention/port/esp32s3/sleep_cpu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ bool cpu_domain_pd_allowed(void)
232232

233233
esp_err_t sleep_cpu_configure(bool light_sleep_enable)
234234
{
235-
#if CONFIG_PM_POWER_DOWN_CPU_IN_LIGHT_SLEEP
235+
#if ESP_SLEEP_POWER_DOWN_CPU
236236
if (light_sleep_enable) {
237237
ESP_RETURN_ON_ERROR(esp_sleep_cpu_retention_init(), TAG, "Failed to enable CPU power down during light sleep.");
238238
} else {

0 commit comments

Comments
 (0)