ext0 can't work together with ext1?
Posted: Sat Feb 22, 2020 1:43 am
I want to wake up esp32 from deepsleep mode by below cases:
1) Key down (gpio 25 turn to low )
2) USB plug in ( gpio 35 turn to high )
So i and below codes on main.c
I found that i can't get above ext0 and ext1 work together while the last one ext work only.
And , each one can work if i remove the other one
Ext0 work :
Ext1 work :
Does i miss any other config?
My board is using ESP-IDF 3.3.1 to build the firmware.
1) Key down (gpio 25 turn to low )
2) USB plug in ( gpio 35 turn to high )
So i and below codes on main.c
Code: Select all
[Codebox=c file=Untitled.c]
#define WAKE_UP_GPIO_25_MASK 0x2000000
esp_sleep_enable_ext0_wakeup(35,1) // wake up when USB connected ,gpio 35 is high
esp_sleep_enable_ext1_wakeup(WAKE_UP_GPIO_25_MASK,ESP_EXT1_WAKEUP_ALL_LOW ) // wake up when the key pressed ,gpio 25 is low
[/Codebox]
And , each one can work if i remove the other one
Ext0 work :
Code: Select all
[Codebox=c file=Untitled.c]
#define WAKE_UP_GPIO_25_MASK 0x2000000
esp_sleep_enable_ext0_wakeup(35,1) // wake up when USB connected ,gpio 35 is high
//esp_sleep_enable_ext1_wakeup(WAKE_UP_GPIO_25_MASK,ESP_EXT1_WAKEUP_ALL_LOW ) // wake up when the key pressed ,gpio 25 is low
[/Codebox]
Code: Select all
[Codebox=c file=Untitled.c]
#define WAKE_UP_GPIO_25_MASK 0x2000000
//esp_sleep_enable_ext0_wakeup(35,1) // wake up when USB connected ,gpio 35 is high
esp_sleep_enable_ext1_wakeup(WAKE_UP_GPIO_25_MASK,ESP_EXT1_WAKEUP_ALL_LOW ) // wake up when the key pressed ,gpio 25 is low
[/Codebox]
My board is using ESP-IDF 3.3.1 to build the firmware.