M5StickC (ESP32 based) gives psram error-infinite reboots

Posted on
of 2
/ 2
  • I am unable to get the ESP32 image (V2.04 or V1.99) to run on M5StickC.

    It will stay up for about 2 mins, then cycles into infinite loop. Based on some googleing I believe the solution might be that I have to compile my own build without he PSRAM option?

     ____                 _
    |  __|___ ___ ___ _ _|_|___ ___
    |  __|_ -| . |  _| | | |   | . |
    |____|___|  _|_| |___|_|_|_|___|
             |_| espruino.com
     2v04 (c) 2019 G.Williams
    Espruino is Open Source. Our work is supported
    only by sales of official boards and donations:
    ýE (518) psram: ESP32PICOD4  do not support psram yet
    E (518) spiram: SPI RAM enabled but initialization failed. Bailing out.
  • I think the M5 Stick doesn't have PSRAM at all. But still, should work without it.
    Does it work for two minutes? If yes, than it might be a hardware issue (bad solder joint, dodgy cable, or anything like that) that only shows up when the board heats up.
    Can you verify the hardware with arduino or micropython?

  • The module is able to run arduino sketches for 10+ minutes. I have a second module that I could test.

  • I'll test it. I have one at home. I haven't been able to flash it. It always tries and never connects. Did you have this issue WIll?

  • I am able to flash it. The key change is to set baud to 115k.

  • Curious to know if you made any progress, having the exact same issue on a M5StickC..

  • @user111255 which version did you tried and how did you flashed?

    Can you please share some WebIDE output how your device behaves.

  • I just encountered the same problem:

     ____                 _
    |  __|___ ___ ___ _ _|_|___ ___
    |  __|_ -| . |  _| | | |   | . |
    |____|___|  _|_| |___|_|_|_|___|
             |_| espruino.com
     2v06.10 (c) 2019 G.Williams
    Espruino is OpÿE (520) psram: ESP32PICOD4  do not support psram yet
    E (520) spiram: SPI RAM enabled but initialization failed. Bailing out.

    I cannot see find an option to disable spiram during the build except in the sdkconfig file which is generated and says DO NOT EDIT?

  • The only way, I know is to change sdkconfig

    CONFIG_SPIRAM_IGNORE_NOTFOUND=y should manage the problem

    May be pico board is not supported well from esp-idf ?

  • Thanks, its currently set to 'y' so I assume you mean to set this to blank. Will try and report back. The M5StickC works well with Arduino, so I will see if I can find the sdkconfig file that they use for the pico and compare it.

  • Sorry, misunderstanding.
    'y' means it should skip the error/reset in case of missing PSRAM

  • I tried flashing my M5stickC and I don't seem to get any issues.

    Found ESP32, 2v06.630
    Connected to /dev/ttyUSB0
    WARNING: Scan stop failed
    WARNING: set rssi scan not implemeted yet
     ____                 _
    |  __|___ ___ ___ _ _|_|___ ___
    |  __|_ -| . |  _| | | |   | . |
    |____|___|  _|_| |___|_|_|_|___|
             |_| espruino.com
     2v06.630 (c) 2019 G.Williams
    Espruino is Open Source. Our work is supported
    only by sales of official boards and donations:

    Then again I just compiled the firmware from the tip of the master branch, so maybe the issue has been fixed since then?

  • Initially, mine worked for up to 5 minutes and then if I left it connected in went into a continuous reboot. Does yours stay up for a long time?

  • Yeah, it runs the blinky the whole while (red LED is at pin 10 if you want to try it out).

  • Will do. Did you build it yourself or get it from the latest build archive?

  • I built it myself :)

  • @parasquid, which version of ESP-IDF did you use ?

  • I'm not really sure, how do I find out? I just used the scripts/provision.sh ESP32 line for building.

    Looking at the script, it looks like this one: curl -Ls https://github.com/espruino/EspruinoBuil­dTools/raw/master/esp32/deploy/esp-idf.t­gz | tar xfz - --no-same-owner

    (commit message says it's 3.1.3)

  • Ahh, I think I may have just triggered it. It looks like since it's being displayed some time before I can connect via serial, I miss the message. I just saw the tip of the message that says SPI RAM enabled but initialization failed.

  • I might have just jinxed myself because now I'm getting all these problems too :D

  • I've just flashed the same binary to my m5 atom matrix https://docs.m5stack.com/#/en/core/atom_­matrix which also has a pico-d4 but this one is stable and has been running the neopixel code https://www.espruino.com/WS2811#software­ for about 10 minutes now.

    I'm not sure what the difference between the two are, except that one has a battery and the other doesn't. For what it's worth, here's the product link for the m5stickc: https://docs.m5stack.com/#/en/core/m5sti­ckc

  • I am beginning to suspect that it may be something to do with not initialising the AXP192 power management unit properly in the M5StickC that is causing the reset loop. The Atom does not have one.

  • Hi jeffmer,

    The M5StickC works well with Arduino...

    Do they run some init routine for the AXP192?

    For Espruino it is possible to convert cpp code into a APX192 module. If this is helps to get ride of those reboots.

  • I charged the M5StickC overnight and ran the AXP192 sample sketch throughout. When the voltage reached around 4v I flashed Espruino and ran the blinky sketch. When I first ran the AXP182 sample sketch, I saw that the battery voltage was just around 3v.

    It looks like things are stable now, so maybe it could be because Espruino was trying to use too much power that the power management IC tried to restart the mcu?

  • If you have had no problems with the Atom, it certainly looks like the AXP192 needs to be initialised. Among other things, it powers the RTC which can reset the ESP32. I plan to test some initialisation code based on the Arduino class - as @MaBe suggests - when I get a chance.

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

M5StickC (ESP32 based) gives psram error-infinite reboots

Posted by Avatar for Will @Will