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

NOPE123
Posts: 2
Joined: Sun Mar 15, 2020 4:12 pm

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

Postby NOPE123 » Fri Mar 20, 2020 12:09 pm

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

ESP_Sprite
Posts: 9730
Joined: Thu Nov 26, 2015 4:08 am

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

Postby ESP_Sprite » Sun Mar 22, 2020 12:21 pm

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).

Who is online

Users browsing this forum: No registered users and 73 guests