Page 1 of 1

GPIO pins reset behaviour during esp_restart() in ESP-IDF

Posted: Thu Jan 23, 2025 6:45 am
by regan.xavier
Hi ESP Team,

I'm currently working with ESP-IDF and have observed a change in GPIO behaviour when using the esp_restart() function.

In ESP-IDF v5.1.4, when esp_restart() is called, all GPIO pins are reset to their default state (logic 0). However, after updating to ESP-IDF v5.3.1, I noticed that GPIO pins retain their state during a software reboot initiated with esp_restart().

Could you kindly explain the reason for this change in behaviour? Additionally, is there any recommended solution to reset all GPIO pins to their default state during a software reboot using esp_restart() in ESP-IDF v5.3.1?

Thanks for your support!

Re: GPIO pins reset behaviour during esp_restart() in ESP-IDF

Posted: Sat Jan 25, 2025 5:58 am
by nopnop2002
What happens if you connect an appropriate GPIO and EN pin with a wire, and set the GPIO to LOW instead of esp_restart()?

esp_restart() is a software reset, but I think manipulating the EN pin is a hard reset.