ext0 can't work together with ext1?

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
Post Reply
User avatar
lolomarx
Posts: 15
Joined: Wed Jan 08, 2020 4:03 am

ext0 can't work together with ext1?

Post by lolomarx » Fri Feb 21, 2020 1:48 pm

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

Code: Select all

#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
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 :

Code: Select all

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
Ext1 work :

Code: Select all

//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
Does i miss any other config?

My board is using ESP-IDF 3.3.1 to build the firmware.

User avatar
jimmo
Posts: 2754
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: ext0 can't work together with ext1?

Post by jimmo » Sat Feb 22, 2020 1:06 am

Although you're using this for MicroPython and hopefully someone here knows the answer, your question is highly ESP-IDF specific so you might get better luck asking on the espressif forums.

Post Reply