Page 1 of 1

Guru Meditation Error: Core 0 panic'ed (Interrupt wdt timeout on CPU0)

Posted: Fri Mar 20, 2020 12:09 pm
by NOPE123
Hi,

I'm trying to reset some NVS data with a press of a button. As soon as the ISR runs, the system reboots.

Here's the short code, what could be the cause, how to solve?

Code: Select all

#include <Preferences.h>
#include <Arduino.h>

#define RESET_BUTTON 23

void IRAM_ATTR reset_isr(){
  Preferences pref;
  pref.begin("wifidata");
  pref.remove("st_ssid");
  pref.remove("st_password");
  pref.end();
  Serial.println("Credientials removed!");
 };


void setup() {
  pinMode(RESET_BUTTON, INPUT_PULLUP);

  attachInterrupt(digitalPinToInterrupt(RESET_BUTTON), reset_isr, RISING);

  Serial.begin(115200);

}

void loop() {
}

Re: Guru Meditation Error: Core 0 panic'ed (Interrupt wdt timeout on CPU0)

Posted: Sun Mar 22, 2020 12:21 pm
by ESP_Sprite
Don't do complex stuff like that in an ISR. Set a variable (or better: use a semaphore) and check for that once you're not in the ISR anymore (e.g. in the main loop).