Merge branch 'bugfix/fix_pm_tests' into 'master'

fix(esp_hw_support): fix pm tests failure caused by non-iram safe test code

Closes IDFCI-1840

See merge request espressif/esp-idf!26530
This commit is contained in:
Jiang Jiang Jian 2023-10-18 16:26:32 +08:00
commit 7e4d7388c7
2 changed files with 5 additions and 4 deletions

View File

@ -652,18 +652,18 @@ static IRAM_ATTR void cpu_domain_dev_regs_restore(cpu_domain_dev_sleep_frame_t *
}
#if CONFIG_PM_CHECK_SLEEP_RETENTION_FRAME
static void update_retention_frame_crc(uint32_t *frame_ptr, uint32_t frame_check_size, uint32_t *frame_crc_ptr)
static IRAM_ATTR void update_retention_frame_crc(uint32_t *frame_ptr, uint32_t frame_check_size, uint32_t *frame_crc_ptr)
{
*(frame_crc_ptr) = esp_crc32_le(0, (void *)frame_ptr, frame_check_size);
}
static void validate_retention_frame_crc(uint32_t *frame_ptr, uint32_t frame_check_size, uint32_t *frame_crc_ptr)
static IRAM_ATTR void validate_retention_frame_crc(uint32_t *frame_ptr, uint32_t frame_check_size, uint32_t *frame_crc_ptr)
{
if(*(frame_crc_ptr) != esp_crc32_le(0, (void *)(frame_ptr), frame_check_size)){
// resume uarts
for (int i = 0; i < SOC_UART_NUM; ++i) {
#ifndef CONFIG_IDF_TARGET_ESP32
if (!periph_ll_periph_enabled(PERIPH_UART0_MODULE + i)) {
if (!uart_ll_is_enabled(i)) {
continue;
}
#endif

View File

@ -85,7 +85,8 @@ menu "Power Management"
config PM_CHECK_SLEEP_RETENTION_FRAME
bool
depends on PM_POWER_DOWN_CPU_IN_LIGHT_SLEEP
default n if !IDF_CI_BUILD
default y if IDF_CI_BUILD
default n
help
This option is invisible to users, and it is only used for ci testing,
enabling it in the application will increase the sleep and wake-up time overhead