Daniel kalu
Daniel kalu
DIIDevHeads IoT Integration Server
Created by Daniel kalu on 9/27/2024 in #firmware-and-baremetal
Implementing Failsafe Mechanism for Firmware Updates on ESP32
Hey guys i am building a custom ESP32-based project (using the ESP32 DevKitC v4 board, with ESP-IDF version 4.4) and want to implement a failsafe mechanism for firmware updates. I've connected GPIO0 to ground via a switch, intending to enter flash mode when the button is pressed and ESP.restart() is called. However, ESP.restart() only restarts the app, ignoring the GPIO0 state. During the restart process, I've captured the following logs and debug messages: "Restarting..." "CPU reset..." "Boot mode: 3 (FLASH BOOT)" "Flash booting @ 0x1000" Despite these logs indicating a flash boot, the board doesn't enter flash mode. I've tried using ESP.restart() with the button pressed, but it doesn't work as expected. Can I force a full boot process, potentially using a direct jump to the hardware reset vector, to enter flash mode when the button is pressed and ESP.restart() is called? Any insights or solutions would be greatly appreciated
6 replies