OTA Update and HW Watchdog Concerns

Hi All…

I apologize that this is a long question.

I read the docs on OTA updates but I’m looking for some more detail. My board is based on an ESP32-WROOM-32U 16MB module and has a hardware watchdog which can not be controlled by the processor. The watchdog timer is 16 seconds. As normal, my firmware has a thread that resets its timer periodically. If the timer expires the ESP32’s EN pin is pulled low to restart.

During an OTA update, I observe that the new firmware is accepted as my application continues to function. Then the ESP32 restarts and reboots. As part of this process, user data stored in the old side is copied to the new side, and it appears that this happens in the bootloader, before my firmware begins to run.

I have two concerns:

1 - By bad luck it’s possible that the WD will restart the ESP32 before the data is done being copied. Will the next restart recover from this or will the data be corrupted?

2 - If there is a lot of data to be copied, it may take longer than the 16 seconds, which will cause the EP32 to be restarted. If it recovers gracefully, it will just do the same thing over again.

My question is, other than giving the ESP32 control over the watchdog hardware, is there a way around this? Even a longer delay does not solve the problem, it merely makes it less likely to happen.

Is there a hook somewhere I can use to restart my watchdog feeder thread before the data copy starts?

Thanks very much…

Could you clarify - are you using mdash library, or Mongoose OS, please?

Sorry, I’m using Mongoose OS.

Anyone have any ideas? This is becoming a showstopper…

Bumping this in hope of a reply…