I have a problem with external Interrupt in ESP32, the serial monitor display this message when interrupt is occurred :
Guru Meditation Error: Core 1 panic'ed (Interrupt wdt timeout on CPU1)
Core 1 register dump:
PC : 0x400d6308 PS : 0x00060e34 A0 : 0x800d640f A1 : 0x3ffbe5d0
A2 : 0x00000031 A3 : 0x00000001 A4 : 0x00060e21 A5 : 0x00000001
A6 : 0x00060e21 A7 : 0x00000000 A8 : 0x0000002e A9 : 0x3ffbe5d0
A10 : 0x3ffaff60 A11 : 0xbaad5678 A12 : 0x3ffb84e4 A13 : 0x00000001
A14 : 0x00060e23 A15 : 0x00000000 SAR : 0x0000000a EXCCAUSE: 0x00000006
EXCVADDR: 0x00000000 LBEG : 0x4000c2e0 LEND : 0x4000c2f6 LCOUNT : 0x00000000
Core 1 was running in ISR context:
EPC1 : 0x400d1c2a EPC2 : 0x00000000 EPC3 : 0x00000000 EPC4 : 0x400d6308
Backtrace: 0x400d6308:0x3ffbe5d0 0x400d640c:0x3ffbe5f0 0x400d6638:0x3ffbe630 0x400d189c:0x3ffbe670 0x400d1d1d:0x3ffbe6a0 0x400d0fed:0x3ffbe6c0 0x400d10a2:0x3ffbe6f0 0x400d10f1:0x3ffbe720 0x400d0d50:0x3ffbe740 0x400d0d7d:0x3ffbe760 0x400d0d90:0x3ffbe780 0x40080ebd:0x3ffbe7a0 0x40081e41:0x3ffbe7c0 0x400e9d9d:0x3ffb1fb0 0x40085aa1:0x3ffb1fd0
Core 0 register dump:
PC : 0x400ea1ae PS : 0x00060534 A0 : 0x800d5f92 A1 : 0x3ffbbff0
A2 : 0x00000000 A3 : 0x00000001 A4 : 0x00000000 A5 : 0x00000001
A6 : 0x00060320 A7 : 0x00000000 A8 : 0x800d70ae A9 : 0x3ffbbfc0
A10 : 0x00000000 A11 : 0x40085214 A12 : 0x00060320 A13 : 0x3ffbb660
A14 : 0x00000000 A15 : 0x3ffbbce0 SAR : 0x00000000 EXCCAUSE: 0x00000006
EXCVADDR: 0x00000000 LBEG : 0x00000000 LEND : 0x00000000 LCOUNT : 0x00000000
Backtrace: 0x400ea1ae:0x3ffbbff0 0x400d5f8f:0x3ffbc010 0x4008794e:0x3ffbc030 0x40085aa1:0x3ffbc050
Rebooting...
any help pls !
Interrupt wdt timeout
-
- Posts: 9769
- Joined: Thu Nov 26, 2015 4:08 am
Re: Interrupt wdt timeout
Nothing we can deduce from that. Please either post your code or at least a backtrace decode.
-
- Posts: 27
- Joined: Mon Apr 06, 2020 1:32 pm
Re: Interrupt wdt timeout
Hi,
I try to change data between ESP32 and capacitive touch through I2C peripheral and IRQ (pin for interrupt), the ISR occures when IRQ change value from high to low.
The firmware was functional, but after installaing the new version of ESP32 in Arduino IDE, It no longer works and the serial monitor display errore msg (above).
you find below my full code:
#include <Wire.h>
#include "Adafruit_MPR121.h"
#define IRQ_pin 2
Adafruit_MPR121 cap = Adafruit_MPR121();
volatile uint16_t lasttouched = 0;
volatile uint16_t currtouched = 0;
void DATA_MPR121(){
// Get the currently touched pads
currtouched = cap.touched();
for (uint8_t i=0; i<12; i++) {
// it if *is* touched and *wasnt* touched before, alert!
if ((currtouched & _BV(i)) && !(lasttouched & _BV(i)) ) {
Serial.print(i); Serial.println(" touched");
}
// if it *was* touched and now *isnt*, alert!
if (!(currtouched & _BV(i)) && (lasttouched & _BV(i)) ) {
Serial.print(i); Serial.println(" released");
}
}
// reset our state
lasttouched = currtouched;
attachInterrupt(digitalPinToInterrupt(IRQ_pin),DATA_MPR121,CHANGE);
}
void setup() {
pinMode(IRQ_pin, INPUT_PULLUP);
Serial.begin(115200);
while (!Serial) { // needed to keep leonardo/micro from starting too fast!
delay(10);
}
Serial.println("Adafruit MPR121 Capacitive Touch sensor test");
if (!cap.begin(0x5A)) {
Serial.println("MPR121 not found, check wiring?");
while (1);
}
Serial.println("MPR121 found!");
delay(400);
attachInterrupt(digitalPinToInterrupt(IRQ_pin),DATA_MPR121,CHANGE);
}
void loop() {
}
I try to change data between ESP32 and capacitive touch through I2C peripheral and IRQ (pin for interrupt), the ISR occures when IRQ change value from high to low.
The firmware was functional, but after installaing the new version of ESP32 in Arduino IDE, It no longer works and the serial monitor display errore msg (above).
you find below my full code:
#include <Wire.h>
#include "Adafruit_MPR121.h"
#define IRQ_pin 2
Adafruit_MPR121 cap = Adafruit_MPR121();
volatile uint16_t lasttouched = 0;
volatile uint16_t currtouched = 0;
void DATA_MPR121(){
// Get the currently touched pads
currtouched = cap.touched();
for (uint8_t i=0; i<12; i++) {
// it if *is* touched and *wasnt* touched before, alert!
if ((currtouched & _BV(i)) && !(lasttouched & _BV(i)) ) {
Serial.print(i); Serial.println(" touched");
}
// if it *was* touched and now *isnt*, alert!
if (!(currtouched & _BV(i)) && (lasttouched & _BV(i)) ) {
Serial.print(i); Serial.println(" released");
}
}
// reset our state
lasttouched = currtouched;
attachInterrupt(digitalPinToInterrupt(IRQ_pin),DATA_MPR121,CHANGE);
}
void setup() {
pinMode(IRQ_pin, INPUT_PULLUP);
Serial.begin(115200);
while (!Serial) { // needed to keep leonardo/micro from starting too fast!
delay(10);
}
Serial.println("Adafruit MPR121 Capacitive Touch sensor test");
if (!cap.begin(0x5A)) {
Serial.println("MPR121 not found, check wiring?");
while (1);
}
Serial.println("MPR121 found!");
delay(400);
attachInterrupt(digitalPinToInterrupt(IRQ_pin),DATA_MPR121,CHANGE);
}
void loop() {
}
-
- Posts: 9769
- Joined: Thu Nov 26, 2015 4:08 am
Re: Interrupt wdt timeout
Don't do a Serial.print in an interrupt. Also, why are you re-attaching the interrupt in your interrupt handler?
-
- Posts: 27
- Joined: Mon Apr 06, 2020 1:32 pm
Re: Interrupt wdt timeout
Thank you for reply, as I told you befor, the firmware was working well befor the installing new version of ESP32, and the "attachInterrupt" ligne in the ISR it's necessary for working.
Regarding your suggestion about Serial.print, I putted it in loop but I get the same result.
Regarding your suggestion about Serial.print, I putted it in loop but I get the same result.
Who is online
Users browsing this forum: No registered users and 107 guests