-
• #2
If i change the code to this:
setInterval( () => { if(digitalRead(D16) == 0) { console.log('D16'); } if(digitalRead(D17) == 0) { console.log('D17'); } if(digitalRead(D18) == 0) { console.log('D18'); } if(digitalRead(D19) == 0) { console.log('D19'); } }, 100);
The error goes away
-
• #3
I'm having the exact same problem - using
setWatch
on the ESP32 sometimes reboots when one of the buttons is pressed.I think this is something to do with how GPIO interrupts the handled by gpio_intr_handler (in jshardware.c) - the code does not disable further interrupts and might be invoked again while processing (buttons generate a lot of interrupts when switching from one state to another, this is why debouncing is needed).
-
• #4
Seems like there is an open issue for this:
https://github.com/espruino/Espruino/issues/2342 -
• #5
I'm experiencing the same problem that we've encountered in the past.
Guru Meditation Error: Core 0 panic'ed (LoadStoreError). Exception was unhandled.
Core 0 register dump:
PC : 0x40096496 PS : 0x00060033 A0 : 0x80095afc A1 : 0x3ffbed30
A2 : 0x40086144 A3 : 0x0000cdcd A4 : 0x00060023 A5 : 0x00000001
A6 : 0xb33fffff A7 : 0x00000036 A8 : 0x0000abab A9 : 0x0000cdcd
A10 : 0x00000002 A11 : 0x3ffea490 A12 : 0x00000000 A13 : 0x3ffea480
A14 : 0x00000000 A15 : 0x00000000 SAR : 0x00000012 EXCCAUSE: 0x00000003
EXCVADDR: 0x40086144 LBEG : 0x400924b4 LEND : 0x400924d0 LCOUNT : 0x00000000
Core 0 was running in ISR context:
EPC1 : 0x40096496 EPC2 : 0x00000000 EPC3 : 0x00000000 EPC4 : 0x00000000
ELF file SHA256: 0000000000000000
Backtrace: 0x40096493:0x3ffbed30 0x40095af9:0x3ffbed60 0x400819a6:0x3ffbed90 0x4008593a:0x3ffbedb0 0x40085835:0x3ffbede0 0x40085d29:0x3ffbee00 0x400860f5:0x3ffbee30 0x40126507:0x3ffea460 0x40134634:0x3ffea480 -
• #6
if you have the .elf file you can use use
https://maximeborges.github.io/esp-stackĀtrace-decoder/
upload .elf file and enter the Stack trace CPU wise to get detail about the function
-
• #7
I finally solved this problem by using an external pull-up resistor at the physical level, and the software should be written like this.
setWatch(callback, pin, { edge: (-1), repeat: true, debounce: 50 });
-
• #8
You might actually find that using a 'cutting edge' build (or 2v24 when released) fixes this as well, as I pushed a change for ESP32 2 weeks ago: https://github.com/espruino/Espruino/commit/e4937494db42b1c3e94d2fa8f1b80f033b053f73
Hiya,
I have this simple piece of code:
Randomly when one of the buttons is pressed I get this error:
And it just goes into a loop and keeps printing this out. Using this Firmware: espruino_2v18_esp32
Any ideas?