Avatar for Ivan

Ivan

Member since Jun 2023 • Last active Jun 2023
  • 1 conversations
  • 2 comments

Most recent activity

  • in ESP32
    Avatar for Ivan

    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

  • in ESP32
    Avatar for Ivan

    Hiya,

    I have this simple piece of code:

    console.log('HELLO');
    console.log(process.memory());
    
    pinMode(D16, 'input_pullup');
    pinMode(D17, 'input_pullup');
    pinMode(D18, 'input_pullup');
    pinMode(D19, 'input_pullup');
    
    console.log(process.memory());
    
    const options = {
      repeat: true,
      debounce: 100
    };
    
    setWatch(e => {
      //{state:bool, time:float, lastTime:float}
      const state = e.state;
      console.log('D16 -> state:', state);
      console.log(process.memory());
    }, D16, options);
    
    setWatch(e => {
      //{state:bool, time:float, lastTime:float}
      const state = e.state;
      console.log('D17 -> state:', state);
      console.log(process.memory());
    }, D17, options);
    
    setWatch(e => {
      //{state:bool, time:float, lastTime:float}
      const state = e.state;
      console.log('D18 -> state:', state);
      console.log(process.memory());
    }, D18, options);
    
    setWatch(e => {
      //{state:bool, time:float, lastTime:float}
      const state = e.state;
      console.log('D19 -> state:', state);
      console.log(process.memory());
    }, D19, options);
    
    

    Randomly when one of the buttons is pressed I get this error:

    >Guru Meditation Error: Core  0 panic'ed (StoreProhibited). Exception was unhandled.
    Core 0 register dump:
    PC      : 0x40096496  PS      : 0x00060c33  A0      : 0x80095952  A1      : 0x3ffb7590
    A2      : 0x800888c3  A3      : 0x0000cdcd  A4      : 0x00060c20  A5      : 0x00000001
    A6      : 0xb33fffff  A7      : 0x00000000  A8      : 0x0000abab  A9      : 0x0000cdcd
    A10     : 0x00000003  A11     : 0x00060c23  A12     : 0x00060c20  A13     : 0x00000000
    A14     : 0x3ffb63ec  A15     : 0x3ffb9a20  SAR     : 0x00000000  EXCCAUSE: 0x0000001d
    EXCVADDR: 0x800888c3  LBEG    : 0x400924b4  LEND    : 0x400924d0  LCOUNT  : 0xffffffff
    ELF file SHA256: 0000000000000000
    Backtrace: 0x40096493:0x3ffb7590 0x4009594f:0x3ffb75c0 0x400d0a4a:0x3ffb7600 0x400859b6:0x3ffb7620 0x400e744b:0x3ffb7650 0x400d4a35:0x3ffb7670 0x400d0bf0:0x3ffb7690
    Rebooting...
    ets Jun  8 2016 00:22:57
    rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
    configsip: 0, SPIWP:0xee
    clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
    mode:DIO, clock div:2
    load:0x3fff0018,len:4
    load:0x3fff001c,len:2984
    load:0x40078000,len:10700
    load:0x40080400,len:5236
    entry 0x40080658
    E (561) psram: PSRAM ID read error: 0xffffffff
    E (561) spiram: SPI RAM enabled but initialization failed. Bailing out.
    E (562) spiram: SPI RAM not initialized
    Guru Meditation Error: Core  0 panic'ed (IllegalInstruction). Exception was unhandled.
    Memory dump at 0x400889a4: 782c7420 1dc1b827 000000f0
    Core 0 register dump:
    PC      : 0x400889ab  PS      : 0x00060130  A0      : 0x000002a3  A1      : 0x3ffbe850
    A2      : 0x00000028  A3      : 0x00020000  A4      : 0x00000000  A5      : 0x400978b4
    A6      : 0x000c1aa3  A7      : 0x00000000  A8      : 0x00000027  A9      : 0x00000000
    A10     : 0x00000027  A11     : 0x00000040  A12     : 0x00000012  A13     : 0xc1aa0000
    A14     : 0xf4240000  A15     : 0x0000a890  SAR     : 0x0000000c  EXCCAUSE: 0x00000000
    EXCVADDR: 0x00000000  LBEG    : 0x4009ae9c  LEND    : 0x4009aea7  LCOUNT  : 0x00000000
    Core 0 was running in ISR context:
    EPC1    : 0x400889ab  EPC2    : 0x00000000  EPC3    : 0x00000000  EPC4    : 0x00000000
    ELF file SHA256: 0000000000000000
    Backtrace: 0x400889a8:0x3ffbe850 0x000002a0:0x3ffbe870 |<-CORRUPTED
    Rebooting...
    

    And it just goes into a loop and keeps printing this out. Using this Firmware: espruino_2v18_esp32

    Any ideas?

Actions