hardware wdt or software wdt is better in esp8266?

Jaya's picture

Offline

Joined: Sep 04, 2018

Replies: 1
hardware wdt or software wdt is better in esp8266?
July 16, 2019 - 1:18pm

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? 

Abhiemanyu Pandit's picture

Offline

Joined: Jan 21, 2019

Replies: 42
hardware wdt or software wdt is better in esp8266?
July 16, 2019 - 1:27pm

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. 

Abhiemanyu Pandit's picture

Offline

Joined: Jan 21, 2019

Replies: 42
hardware wdt or software wdt is better in esp8266?
July 16, 2019 - 1:36pm

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(){}

Muhammad Umar's picture

Offline

Joined: Apr 09, 2020

Replies: 55
Section between Hardware or Software WDT
May 9, 2020 - 2:54pm

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.

Technical Shahzad's picture

Offline

Joined: May 23, 2020

Replies: 48
Selecting Hardware or Software WDT
May 26, 2020 - 2:57pm

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.