mirror of
https://github.com/espressif/esp-idf.git
synced 2025-10-07 21:47:21 +00:00
Merge branch 'bugfix/clear_ulp_wake_intr_in_wake_source_enable_v5.1' into 'release/v5.1'
fix(esp_hw_support): clear all type ULP wakeup intr status at ulp wakeup source enable (backport v5.1) See merge request espressif/esp-idf!27188
This commit is contained in:
@@ -628,16 +628,25 @@ static esp_err_t IRAM_ATTR esp_sleep_start(uint32_t pd_flags, esp_sleep_mode_t m
|
||||
}
|
||||
#endif
|
||||
|
||||
#if CONFIG_ULP_COPROC_TYPE_FSM
|
||||
#if CONFIG_ULP_COPROC_ENABLED
|
||||
// Enable ULP wakeup
|
||||
#if CONFIG_ULP_COPROC_TYPE_FSM
|
||||
if (s_config.wakeup_triggers & RTC_ULP_TRIG_EN) {
|
||||
#elif CONFIG_ULP_COPROC_TYPE_RISCV
|
||||
if (s_config.wakeup_triggers & (RTC_COCPU_TRIG_EN | RTC_COCPU_TRAP_TRIG_EN)) {
|
||||
#elif CONFIG_ULP_COPROC_TYPE_LP_CORE
|
||||
if (s_config.wakeup_triggers & RTC_LP_CORE_TRIG_EN) {
|
||||
#endif
|
||||
#ifdef CONFIG_IDF_TARGET_ESP32
|
||||
rtc_hal_ulp_wakeup_enable();
|
||||
#elif CONFIG_ULP_COPROC_TYPE_LP_CORE
|
||||
pmu_ll_hp_clear_sw_intr_status(&PMU);
|
||||
#else
|
||||
rtc_hal_ulp_int_clear();
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
#endif // CONFIG_ULP_COPROC_ENABLED
|
||||
|
||||
misc_modules_sleep_prepare(deep_sleep);
|
||||
|
||||
#if CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3
|
||||
|
Reference in New Issue
Block a user