v2.04 Causes Resets

Posted on
  • Hi, I'm just posting this in case anyone else experienced this, but when using v2.04 on some largish code (40K minified down to 20k), I get resets with exccause 3.

    ets Jan  8 2013,rst cause:2, boot mode:(3,7)
    load 0x40100000, len 2408, room 16
    tail 8
    chksum 0xe5
    load 0x3ffe8000, len 776, room 0
    tail 8
    chksum 0x84
    load 0x3ffe8310, len 632, room 0
    tail 8
    chksum 0xd8
    csum 0xd8
    2nd boot version : 1.6
      SPI Speed      : 80MHz
      SPI Mode       : QIO
      SPI Flash Size & Map: 32Mbit(1024KB+1024KB)
    jump to run user1 @ 1000
      "reason": "exception",
      "exccause": 3, "epc1": 1073799076, "epc2": 0, "epc3": 0, "excvaddr": 1076285788,
      "depc": 0 }
    Running onInit()...

    This seems to be caused by a LoadStore error -- I found this description to go along with it "Processor internal physical address or data error during load or store".

    If I flash back to 2v03, everything is fine. I'm using a totally normal 4MB ESP-12f.


  • Have you called make erase before flashing the new firmware?

    Latest build of Espruino works stable for me.

      VERSION: "2v04.274",
      GIT_COMMIT: "1921e46c1",
      BOARD: "ESP8266_4MB",
      FLASH: 0, RAM: 81920,
      SERIAL: "84f3eb0d-17d4",
      CONSOLE: "Serial1",
      MODULES: "Flash,Storage,hea" ... "r,crypto,neopixel",
      EXPTR: 1073643636 }

    Edit: Including save().

  • OK good! Thanks for checking that! It might be I just have a board with flakey flash. "storage.compact()" is also not working on it -- triggers a wdt reset -- so that points to flash as well. I'll try a couple of other boards and see what happens.


  • Maybe switch from qio to dio when flashing.

  • Yeah I got this working finally, so that's good. I've always used qio and dio interchangeably, but on this board dio worked finally. Anyways thanks again! :)

  • Hey @MaBe!

    Maybe switch from qio to dio when flashing.

    Using qio I wasn't able to connect and it was looking like this:

    $ espruino -b 115200 --no-ble 
    Espruino Command-line Tool 0.1.20
    Using first port, {"path":"/dev/cu.wchusbserialfa1340","us­b":[6790,29987]}
    Connecting to '/dev/cu.wchusbserialfa1340'
    No result found for "process.env" - just got ""
    Unable to retrieve board information.
    Connection Error?

    Using dio I am now able to connect but looks like it is reseting the board on every connect.

    Any idea?

  • Hi,

    what’s the flash_id and chip_id of your board?

  • I just tried another one marked 'AI Thinker' and that seems to work ok.

      sdkVersion: "2.2.1(6ab97e9)", 
      cpuFrequency: 160, freeHeap: 11144, maxCon: 10, 
      flashMap: "4MB:1024/1024", 
      flashKB: 4096, 
      flashChip: "0xe0 0x4016"

    This is a 'doit esp8266' board which is giving me trouble (tried 2v00, 2v04 and now running the master build). Same results - resets on connection (when flashed with dio, doesn't connect when flashed with qio):

      sdkVersion: "2.2.1(6ab97e9)", 
      cpuFrequency: 160, freeHeap: 13296, maxCon: 10, 
      flashMap: "4MB:1024/1024", 
      flashKB: 4096, 
      flashChip: "0xc8 0x4016"
      VERSION: "2v04", 
      GIT_COMMIT: "1c3547a", 
      BOARD: "ESP8266_4MB", 
      FLASH: 0, RAM: 81920, 
      SERIAL: "5ccf7fb8-e75e", 
      CONSOLE: "Serial1", 
      MODULES: "Flash,Storage,hea" ... "r,crypto,neopixel", 
      EXPTR: 1073643636 }
  • Yes, the AI Thinker work great with qio, check this page for details on flash_mode.

    I was testing some EPS01 which gave me a hard time too.....

    Result: some work with dio and some only with dout

    That's why you can add some flash setting with make

    • ET_FM= valid values for flash mode are qio, qout, dio, dout

    • ET_FS= valid values for flash size are 256KB, 512KB, 1MB, 2MB, 4MB, 2MB-c1, 4MB-c1, 8MB, 16MB

    Check this page for further details

  • Thank you @MaBe for all the info!

    I'll try the dout as the last thing...

    Then I guess I give up as I am starting to think that the USB serial is strange. Appears to be loosing characters during ./espruino --no-ble ./index.js. Sometimes it gives syntax errors during that on that one particular board.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview

v2.04 Causes Resets

Posted by Avatar for hungryforcodes @hungryforcodes