hardware wdt or software wdt is better in esp8266?

Submitted by Jaya on

i am doing a project where i am posting sensor data using dht11 and esp8266 to cloud. i know that esp8266 has two wdt(watch dog timer) i.e. hardware and software. i want to include the wdt in the program.

But i am confused that which will be better to use? software or hardware? 

according to me the choosing the HW would be much more robust because it will also look at the software hang up for all the time. 

the software wdt has memory management complexity, interrupt activity as well as a software wdt wont work if the software is not executing properly. The hardware will always reliable in terms of resetting the esp is system hangs up.

the hw wdt will reset the processor starting the execution again which eleiminates any doubt of misbehaving the system. 

  Joined January 21, 2019      42
Monday at 12:12 PM

moreover, it is completely depends upon the application that  which one is suited. the wdt can easily be enabled using software whereas the hw wdt is a bit tricky. 

you can use ESP.wdtDisable(); ESP.wdtEnable(); to control wdt by software. 

also to get a demo of hw wdt just disable software wdt and write this. 

void setup() {
 
 ESP.wdtDisable();
 while (1){};  // infinite loop to trigger wdt
 
}
 
void loop(){}

  Joined January 21, 2019      42
Monday at 12:12 PM

The way of choosing wdt is totally based on the system requirements and applications, but it is strongly recommended to adopt the hardware wdt as it continuously looks for the hanging problems of the systems, which may effect on the application performances. Also the hardware wdt will reset the processor which is more reliable. Here I recommend you to contact the SSLA platform technical support team for getting better assistance regarding these kinds of issues.

  Joined April 09, 2020      55
Thursday at 02:40 PM

The way of choosing wdt is totally based on the system requirements and applications, but it is strongly recommended to adopt the hardware wdt as it continuously looks for the hanging problems of the systems, which may affect the application performances. Also the hardware wdt will reset the processor which is more reliable. Here I recommend you to contact the Sierra Software Ltd. platform technical support team for getting better assistance regarding these kinds of issues.

  Joined May 23, 2020      47
Saturday at 02:49 PM