Update 01/29/2019: Espressif confirmed they are working on a fix in a comment to the GitHub issue today.
A month ago we reported that PSRAM cache issues still exist with the ESP32, which result into random crashes when using the external RAM of the ESP32-WROVER. These issues exist with the up-to-date revision 1 of the chip.
We noticed these crashes while developing and using low.js. Random crashes/reboots every few hours is definitely something which Espressif should fix quickly.
To help, we created a small sample project, uploaded it to GitHub at (https://github.com/neonious/memcrash-esp32 and opened a GitHub issue with ESP-IDF at https://github.com/espressif/esp-idf/issues/2892. However, nothing happened yet.
Today we reevaluated the problem. We made the sample project smaller and learner, tried to understand the problem more and figure out workarounds.
Writing and then reading in the lower and upper 2 MB of PSRAM at the same time can result into reading old values and not the newly written values, which results into crashes. (This happens in the standard low/high mode, in even/odd mode this happens more randomly). Update: This only happens in Dual-Core mode!
In our sample project this happens when the write is done in a different function than the read. If both are done in the same function, the problem does not exist.
- Adding asm(“memw”); at the end of each function which stores data to PSRAM seems to work. However, this is slow. BTW: Just adding a few asm(“nop”) does not fix this problem at all
- Only use the lower 2 MB of PSRAM
We do not like any of the two workarounds. Does anybody have an idea where to continue here?
Some other things…
Thank you for reading! If you like what we are doing, please take a look at the following things:
- We are looking for somebody to help us sell our products to companies world-wide! We are a small startup, but we have potential! Take a look at our job advertisement!
- We launched a hacking contest! Earn up to 500 USD in cash or for charity just by building cool things with low.js!
- Please take a look at www.neonious.com for a great microcontroller board with low.js, Ethernet and Wifi. The on-board integrated IDE + debugger allows you to rapidly try out stuff and have lots of fun.