I have been working with an ESP32-S3-DEVKITC-U1-N8R8 very successfully, using PSRAM for large arrays then all of a sudden when I upload new (or old, known working) code I get the following errors and the PSRAM of course will not init. I am using Visual Code Studio with Platformio as my IDE.
After it happened on one DEVKIT, I got out another brand new one and got the same error messages.
Is it possible that my IDE somehow corrupted a file that is being loaded? This would be some sort of configuration file since this error is happening for all my previously working projects that use this board. And if so, how do I restore the necessary files?
What has changed, I ask myself… well I was alternatively using a FeatherS3 and the DevKit boards, changing the platformio.ini config when I changed boards. In any case, everything was fine and then all of a sudden all DEVKIT boards throw this PSRAM ID read error message.
Just for good measure, here is my platformio.ini file which has worked just fine all along.
Hi Max,
I have not used the Arduino IDE in years… The code was working fine on Platformio. I did a pio --update dev at one point and wonder if that might have something to do with this. I am going to do some file comparisons this morning from projects that were working against the ones that are not to see if any of the files in the .pio\build directory changed.
Hi Max. Thank you. Unfortunately none of those helped.
This is so odd since it was working earlier for many code examples. I am just trying an “hello world” program now. I am wondering if perhaps the .json is not correct. (I am using the N8R8 chip).
Did you overwrite the contents of esp32-s3-devkitc-1.json in C:\Users\<user>\.platformio\platforms\espressif32\boards? with the JSON content you showed? Or where is that file you’re showing the contents of?
Can you still cross-check against the Arduino IDE with latest Arduino-ESP32 2.0.5? That way we can find out whether it’s a PlatformIO issue or a Arduino-ESP core (or ESP-IDF) issue.
Hi Max,
I am certainly willing to follow your sage advice and try this on Arduino IDE. I will probably have to do some work to figure out how to tell it turn on the right amount of PSRAM… still waiting for esp install to complete.
What really bothers me is that MANY programs using this devkit board and PSRAM were working just great on the platformio IDE and then suddenly, not working. One thing I was doping was switching back and forth with the UM FeatherS3 by changing the platformio.ini file, cleaning, and re-compiling/uploading. The UMFeatherS3 has its PSRAM external to the processor. Could something have “cross-contaminated” my settings? Would a complete clean install of VS Code and PlatformIO perhaps be an option here?
OK Max… I have done some testing with the (dreaded) Arduino IDE.
I did some testing to make absolutely sure that PSRAM was being used. It all works fine there. I won’t bother you with that code unless you want to see it.
This might have given me a clue… while setting up the PSRAM in the Tools menu of the Arduino IDE, I have to select QSPI or OPI PSRAM. The FeatherS3 uses QSPI but the Devkit uses OPI. Perhap somehow in switching back and forth between the two processor boards I managed to select QSPI in a way that it is not switching back to OPI when I go to the DEVKIT board. My next step is to look into making sure OPI is selected in my configurations on Platformio.
For ESP32S3, the builder scripts respects the build.arduino.memory_type field (source) to select one of the folders here for the first part (the second part after the _ is fixed to qspi.
I keep asking myself “what has changed?” Always the best first and last trouble-shooting question. One thing that has changed lately is that I added file synchronization to my GoogleDrive. This has had the unwanted side-effect of constantly changing the timestamp on all my files when I reboot. I am wondering if this might be wreaking havoc on the file rev management within Platformio. Thoughts?
Well… I completely rebuilt my Visual Studio Code and platformio environment after completely deleting all the files. Created a new project using board = esp32-s3-devkitc-1 Copies and pasted known good main.cpp. Used the following platformio, also known good from prior usage.
Thanks to your help, my undefeated record remains intact.
After the clean install I went back through all the things we tried again. The key is just one line in the platformio.ini which you had suggested (the json file is correct and did not need change),
All I can figure as to how things went off the rails was a tug of war with GoogleDrive. I have now taken that of system. I can’t explain for certain whit worked previously without that line, but I am happy to have a known working configuration now which should be stable going forward.