I am a bit confused with the behavior of GPIO outputs with light sleep. I know that deep sleep deactivates GPIOs unless you configure them to maintain the value (e.g. with rtc_gpio_hold_en()). But I was not expecting light-sleep to also deactivate GPIO outputs.
My code calls esp_pm_configure() with light_sleep_enable set to true, and as soon as the device enters light sleep, the GPIO outputs that were set, go to 0. Is this normal? In case it is, how can I prevent it using esp-idf APIs?
Light-sleep and GPIOs on ESP32-S3
Re: Light-sleep and GPIOs on ESP32-S3
After HOURS of digging, I found the problem.
It looks like by default, pins are configured with IO_MUX_SLP_SEL = 1, because calling gpio_sleep_sel_dis() on a pin, caused it to not drop its value during light sleep.
I wonder why this is the default, doesn't make too much sense to me, but at least I got it working.
It looks like by default, pins are configured with IO_MUX_SLP_SEL = 1, because calling gpio_sleep_sel_dis() on a pin, caused it to not drop its value during light sleep.
I wonder why this is the default, doesn't make too much sense to me, but at least I got it working.
Who is online
Users browsing this forum: Applebot, Baidu [Spider], Google [Bot], PerplexityBot, Qwantbot and 6 guests