Page 1 of 1

Revert OTA cutting power supply and rebooting multiple times

Posted: Thu Feb 14, 2019 5:50 pm
by giomar
Hello everyone!

I'm a newbie and I'm successfully experimenting with the ESP-MDF OTA.

I'm interested in the following function of the "Mupgrade" solution (https://github.com/espressif/esp-mdf/bl ... pgrade.rst):
Revert to an earlier version: The device can be reverted to a previous version using specific approaches, such as triggering GPIO, or cutting the power supply and rebooting for multiple times.
Is there any example to accomplish this result?

I'm looking for a solution that allows me to revert to the factory partition only toggling the power supply (without the use of buttons or commands).

Thank you in advance for any help!

Re: Revert OTA cutting power supply and rebooting multiple times

Posted: Mon Feb 18, 2019 5:57 pm
by fly135
Reverting to the factory partition by cycling power doesn't make any sense to me. Why don't you describe the conditions by which you wish to initiate a revert to factory partition. You could use this to decide whether it's a software reboot or a power up...

RESET_REASON reason0 = rtc_get_reset_reason(0);
RESET_REASON reason1 = rtc_get_reset_reason(1);

Maybe looking at the reset reason will help you.

John A