-->
Page 1 of 2

Disabling the hardware watchdog

PostPosted: Thu Sep 05, 2019 5:19 am
by Brais Solla
I manage to complety disable the hardware watchdog on ESP8266 in order to run the benchmark CoreMark. I think that this will be useful in some cases.

First, disable the software wdt using ESP.wdtDisable()

Code: Select allvoid hw_wdt_disable(){
  *((volatile uint32_t*) 0x60000900) &= ~(1); // Hardware WDT OFF
}

void hw_wdt_enable(){
  *((volatile uint32_t*) 0x60000900) |= 1; // Hardware WDT ON
}


And this is it, you will no longer experience resets if you don't feed the watchdog

Re: Disabling the hardware watchdog

PostPosted: Fri Sep 20, 2019 2:58 am
by eriksl
Very risky business! This should never be used without proper knowledge of the consequences (i.e. all those folks that try to run the programs for PC's or other embedded platforms from the internet, that are not event based and can never work on the ESP8266).

Having said that, very useful information, thanks for sharing it!

Re: Disabling the hardware watchdog

PostPosted: Fri Oct 16, 2020 9:49 am
by schufti
Hi,
looks like directly accessing the registers, so shouldn't be depending on a certain sdk version?
Somehow it is not working for me - any other prerequisites necessary?

I do
Code: Select all  yield();
  ESP.wdtDisable(); // Software WDT OFF
  *((volatile uint32_t*) 0x60000900) &= ~(1); // Hardware WDT OFF

and still get "Soft WDT reset" with stackdump after ~75s

any update or hint appreciated

Re: Disabling the hardware watchdog

PostPosted: Fri Oct 16, 2020 11:20 am
by eriksl
1. This is not SDK, this is arduino, ask in the arduino section...
2. again, you should never disable the watchdog but fix the problem