IO pulled low when entering light sleep

krajaan
Posts: 16
Joined: Mon Mar 20, 2017 5:59 pm

IO pulled low when entering light sleep

Postby krajaan » Wed Jul 18, 2018 1:30 pm

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?

jimparis
Posts: 7
Joined: Fri Jun 15, 2018 7:29 pm

Re: IO pulled low when entering light sleep

Postby jimparis » Wed Oct 28, 2020 4:42 am

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.

Who is online

Users browsing this forum: No registered users and 315 guests