ulp: make sure I_WAKE instruction works with ULP timer disabled

Setting ULP_CP_WAKEUP_FORCE_EN forces ULP wakeup to work even if the
ULP timer has already been disabled.
pull/425/head
Ivan Grokhotkov 2017-02-22 17:04:11 +08:00
rodzic 5cab04075e
commit e96d653c9e
1 zmienionych plików z 3 dodań i 0 usunięć

Wyświetl plik

@ -126,6 +126,9 @@ void IRAM_ATTR esp_deep_sleep_start()
if (s_config.wakeup_triggers & EXT_EVENT1_TRIG_EN) {
ext1_wakeup_prepare();
}
if (s_config.wakeup_triggers & SAR_TRIG_EN) {
SET_PERI_REG_MASK(RTC_CNTL_STATE0_REG, RTC_CNTL_ULP_CP_WAKEUP_FORCE_EN);
}
// TODO: move timer wakeup configuration into a similar function
// once rtc_sleep is opensourced.