Some issue on Fota and Secure Firmware enabled VM

Hi,

I’m very struggling with a problem with fota secure firmware enabled vm.
My code was working well on Fota enabled VM installed on ESP32.
I removed the fota enabled vm and installed fota and secure firmware enabled vm. And then I run the same code on it, but the esp32 is rebooting continuously during execution.

My code worked well on a fota enabled vm.
My code doesn’t have ZDM feature. Instead, I use flash in my code with the following command.
ff = flash.FlashFileStream(0x00350000, 512)
The start address does not violate the flash layout available for the user.

I tried several ways to solve this problem, but I didn’t find the correct way.
What’s the reason of the rebooting? How can I solve this problem?
I really hope you can get back to me with a good solution as soon as possible. (I posted the several problems related to my project to Zerynth for the last week, but I’m not getting any answer from any threads. What happened to you? I’m very nervous and worried.)

Thanks.
Anatoli.

Here is some my additional test result for the above problem.
I also run some other zerynth example codes on the fw security and fota enabled vm. The ESP32 restarts every 30 seconds after startup, regardless of the code being uploaded. That’s very strange!
That means my code is not related to reboot. I feel that something like an interrupt or timer is running inside the esp32 when using fw security and fota enabled vm.
I also tested without removing the usb cable, but still it seems to reboot.
Is there any constrain when using fw security and fota enabled vm?

Hi @Anatoli_Juny
In the secure Firmware, the watchdog timer is enabled by default for period of 30 seconds, as stated in the documentation.

The RTC watchod is enabled by the bootloader and set to 30 seconds by default. This allows to recover from a faulty firmware that does not have time to configure the watchdog at startup. However, when using a secure firmware VM it is mandatory to configure the watchdog in the first 30 seconds of execution

You need to kick the timer periodically, for more information check the documentation of the watchdog timer.

Thanks for your help! @karimhamdy1
That works for me.