Page 1 of 1

GPIO as trigger source for wake-up sleep mode,When the wake-up event is triggered, get the pin number is 0.

Posted: Fri Oct 12, 2018 2:38 am
by zhoupeng
In deep sleep mode,Wake up device by triggering IO:

const uint64_t ext_wakeup_pin_mask = (1ULL << 33);
esp_sleep_enable_ext1_wakeup(ext_wakeup_pin_mask, ESP_EXT1_WAKEUP_ALL_LOW);
esp_deep_sleep_start();


i can get evnets ESP_SLEEP_WAKEUP_EXT1,but Call function esp_sleep_get_ext1_wakeup_status(),return 0;
Use high level trigger to get IO number normally.

Re: GPIO as trigger source for wake-up sleep mode,When the wake-up event is triggered, get the pin number is 0.

Posted: Fri Oct 12, 2018 3:33 am
by WiFive

Re: GPIO as trigger source for wake-up sleep mode,When the wake-up event is triggered, get the pin number is 0.

Posted: Sat Oct 13, 2018 2:02 am
by zhoupeng
According to my understanding, because the trigger condition is ESP_EXT1_WAKEUP_ALL_LOW,So I can't judge which pin is triggered。
1、In this configuration,the function esp_sleep_get_ext1_wakeup_status always return 0?
2、Suppose I have three trigger pins, how to distinguish?

Re: GPIO as trigger source for wake-up sleep mode,When the wake-up event is triggered, get the pin number is 0.

Posted: Sat Oct 13, 2018 4:28 am
by WiFive
If you have 3 trigger pins ALL_LOW means all 3 pins have to be low at the same time to wake up, you can't tell in which order they went low. There is no setting for ANY_LOW.