Page 1 of 1

IO pulled low when entering light sleep

Posted: Wed Jul 18, 2018 1:30 pm
by krajaan
Hi,
I've come across a situation where using timer as a wakeup source causes a GPIO to be pulled low upon entering light sleep.

The GPIO is GPIO17 and it's configured as basic output without pullup/pulldown resistors. I have full control over it outside of sleep, but if

Code: Select all

esp_sleep_enable_timer_wakeup(1000ULL * 1000ULL * 300ULL);
is called before

Code: Select all

esp_light_sleep_start();
, the pin is immediately pulled low upon entering sleep, even when I've set it to high. This does not happen if I don't use the timer as a wakeup source.

I've tried configuring the pin in different modes, with pullup resistor, increasing drive capability, keeping all power domains active during sleep, but nothing has worked so far.

Code: Select all

gpio_hold_en(GPIO_NUM_17);
doesn't have any effect either.

Is there something I am missing?

Re: IO pulled low when entering light sleep

Posted: Wed Oct 28, 2020 4:42 am
by jimparis
Try

Code: Select all

esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_PERIPH, ESP_PD_OPTION_ON);
This is needed because, by default, the RTC_PERIPH power domain (IO, sensors, ULP) will only be enabled if you're using one of them as a wakeup source.