I developed an application that use deep sleep.
And I need to read a level of a GPIO that is used to awake after a device is awakened.
I used internal pull-up resistor and I made the device will be awake when the level of the GPIO is LOW.
But after the device is awakend, the level is always LOW, never change!
First I used esp_sleep_enable_ext0_wakeup function like this.
Code: Select all
esp_sleep_enable_ext0_wakeup(14, 0);
gpio_pad_select_gpio(14);
gpio_set_direction(14, GPIO_MODE_INPUT);
gpio_set_pull_mode(14, GPIO_PULLUP_ONLY);
esp_deep_sleep_start();
Code: Select all
esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_PERIPH, ESP_PD_OPTION_ON);
gpio_pullup_en(14);
gpio_pulldown_dis(14);
const int ext_wakeup_pin_1 = 14;
const uint64_t ext_wakeup_pin_1_mask = 1ULL << ext_wakeup_pin_1;
esp_sleep_enable_ext1_wakeup(ext_wakeup_pin_1_mask, ESP_EXT1_WAKEUP_ALL_LOW);
esp_deep_sleep_start();
Even if I used external pull-up resistor with esp_sleep_enable_ext0_wakeup.
But when I used external pull-up resistor with esp_sleep_enable_ext1_wakeup, the level of GPIO 14 is changing.
I think that this is a bug.