Avatar for Ruprect99

Ruprect99

Member since Jun 2016 • Last active May 2021
  • 9 conversations
  • 34 comments

Beginner

Most recent activity

  • in ESP32
    Avatar for Ruprect99

    Hi,

    Is it possible to get the reset info on the ESP32 like it is on the ESP8266?

    Is there a way to parse the startup text that is displayed on the console to get the reset info?

    Thanks,

    Rob Smart

    • 1 comment
    • 120 views
  • in ESP32
    Avatar for Ruprect99

    Hi,

    I'm using a ESP32 to listen for BLE packets and I'm getting the occasional error. Any ideas on how to figure out the issue?

    Guru Meditation Error: Core 0 panic'ed (LoadStoreError). Exception was unhandled.
    Core 0 register dump:
    PC : 0x400d8da0 PS : 0x00060c30 A0 : 0x800ea8ca A1 : 0x3ffde630
    A2 : 0x3ffed1bc A3 : 0x00000000 A4 : 0x00000000 A5 : 0x00001e00
    A6 : 0x00000000 A7 : 0x00000000 A8 : 0x4006182c A9 : 0x00007468
    A10 : 0x00000076 A11 : 0x00000000 A12 : 0x0000000e A13 : 0x000003fe
    A14 : 0x7ff00000 A15 : 0x7ff38800 SAR : 0x00000012 EXCCAUSE: 0x00000003
    EXCVADDR: 0x40061830 LBEG : 0x4009b418 LEND : 0x4009b423 LCOUNT : 0x00000000

    Backtrace: 0x400d8da0:0x3ffde630 0x400ea8c7:0x3ffde650 0x400ea91d:0x3ffde700 0x400f9a3c:0x3ffde720

    Many Thanks,

    Rob Smart

    • 1 comment
    • 124 views
  • in ESP8266
    Avatar for Ruprect99

    Hi,

    I've been flashing ESP's for ages with Espruino and this is the first time I've seen this.

    I've got a really simple bit of code:

    function main() {
     var BTN = 12;
     
      var rgb = new Uint8ClampedArray(3*3);
      var pos = 0;
      function getPattern() {
        pos++;
        for (var i=0;i<rgb.length;) {
          rgb[i++] = (1 + Math.sin((i+pos)*0.1324)) * 127;
          rgb[i++] = (1 + Math.sin((i+pos)*0.1654)) * 127;
          rgb[i++] = (1 + Math.sin((i+pos)*0.1)) * 127;
        }
        return rgb;
      }
      setInterval(function() {
        require("neopixel").write(14, getPattern());
      }, 100);
    
    pinMode(12, 'input_pullup');
      setWatch(function(e) {
        console.log('bttn pressed');
      }, 12, { repeat: true, debounce:100, edge: 'falling' });
    }
    
    E.on('init', main);
    

    Just to flash some LED's and listen to a button press, and if I type save in the console to store the code, I just get an endless loop of errors reading this:

    [ERASED]
    in function called from system
    Uncaught SyntaxError: Got [ERASED] expected EOF
    at line 1 col 1

    I'm sure I'm flashing the correct firmware (the V2.08 4mb ESP8266 version)

    Any ideas?

    Thanks,

    Rob

  • in ESP32
    Avatar for Ruprect99

    Hi,

    I hadn't seen that other e-ink display. I can certainly use that for some help.

    I need to map out the manufacturers process in the c code they supply as I think there might be some more steps (like actually powering the display on first) that I might be missing.

    I was aware of the getting the spi lines round the wrong way so did try it both ways around.

    I will update on progress when I make some!

    Thanks

  • in ESP32
    Avatar for Ruprect99

    Hi,

    I've been looking at this code to try and convert to run an e-ink display (M5Paper) (https://github.com/gnzzz/IT8951/blob/89d­505b26f130539644117522a0fdc128ffe44c1/li­b/it8951.ts)

    I'm pretty new to SPI so have been trying to figure it out.

    looking through the forums I've managed to piece together 3 methods for reading, writing and sending commands

    var read = function(reg,len) { // read
      return SPI1.send([reg|SPI_PREAMBLE.READ,new Uint8Array(len)], cs).slice(1);
    };
    
    var write = function(reg,data) { // write
        return SPI1.write(reg, data, cs);
    };
    
    var command = function(c,d) {
        SPI1.write(c, cs);
        if (d!==undefined) {
          dc.set();
          SPI1.write(d, cs);
        }
      }
    

    But it doesn't work. So for example in the code I'm looking at, this gets called

     this.setRegister(SYS_REG.I80CPCR, 0x0001);
     this.spi.writeWords(
                Uint16Array.from([SPI_PREAMBLE.CMD, USDEF_I80_CMD.GET_DEV_INFO])
     );
     const data = this.spi.readWords(20);
    

    I've converted this to:

    write(SPI_PREAMBLE.WRITE|SYS_REG.I80CPCR­, 0x0001);
    let info = read(SPI_PREAMBLE.CMD|USDEF_I80_CMD.GET_­DEV_INFO,20)
    

    but info is just full of zeros.

    I'm not sure if I'm totally on the wrong track or just missing some key bit of information.

    Thanks,

    Rob Smart

  • in ESP32
    Avatar for Ruprect99

    I'm also seeing this error with pin 25

Actions