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
pull/12486/head
Jiang Jiang Jian 2023-10-18 16:26:32 +08:00
commit 7e4d7388c7
2 zmienionych plików z 5 dodań i 4 usunięć

Wyświetl plik

@ -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 #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); *(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)){ if(*(frame_crc_ptr) != esp_crc32_le(0, (void *)(frame_ptr), frame_check_size)){
// resume uarts // resume uarts
for (int i = 0; i < SOC_UART_NUM; ++i) { for (int i = 0; i < SOC_UART_NUM; ++i) {
#ifndef CONFIG_IDF_TARGET_ESP32 #ifndef CONFIG_IDF_TARGET_ESP32
if (!periph_ll_periph_enabled(PERIPH_UART0_MODULE + i)) { if (!uart_ll_is_enabled(i)) {
continue; continue;
} }
#endif #endif

Wyświetl plik

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