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

zhoupeng
Posts: 35
Joined: Sun Sep 24, 2017 1:31 pm

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

Postby zhoupeng » Fri Oct 12, 2018 2:38 am

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.


zhoupeng
Posts: 35
Joined: Sun Sep 24, 2017 1:31 pm

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

Postby zhoupeng » Sat Oct 13, 2018 2:02 am

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?

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

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

Postby WiFive » Sat Oct 13, 2018 4:28 am

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.

Who is online

Users browsing this forum: Google [Bot], Majestic-12 [Bot] and 113 guests