I have a software function that takes at least 3 seconds, so when entering this function, the ESP crashes for watchdog time-out ( it look that the software watchdog is set to 2 seconds).
For the time being, I can skip this issue by using:
ESP.wdtEnable(value);
before calling this function.
(see example below)
Now any time value will work (even 0) so I can't fine tune this value to fit my environment
If I use the at setup; ESP.wdtEnable(value) it has no effect.
If I use ESP.wdtDisable(); at setup my function crashes immediately
If have also used different combinations of ESP.wdtFeed(), without results
So the question:
Is there a description or guidelines how to safely use the functions:
ESP.wdtDisable();
ESP.wdtEnable();
ESP.wdtFeed();
Thanks in advance
Robert
void myFunction ()
{
long TIMEOUT = 3000;
long now = millis();
while ((millis()-now<TIMEOUT))
{
}
}is solved by:
void myFunction ()
{
ESP.wdtEnable(0);
long TIMEOUT = 3000;
long now = millis();
while ((millis()-now<TIMEOUT))
{
}
}