-
Notifications
You must be signed in to change notification settings - Fork 7.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ESP32-CX external PSRAM SUPPORT (IDFGH-9872) #11193
Comments
Hi @CrowdedFuzzball, the C-series chips (C2, C3, C6) do not have hardware support for PSRAM. This means that:
A software-based approach to integrate PSRAM into the CPU address space is also theoretically possible:
This concept was implemented a while ago on the venerable ESP8266 (which also has no hardware PSRAM support) in esp8266/Arduino#6994. The performance of such way to access PSRAM is most likely not great: entering and exiting the exception handler is expensive, there is no caching, therefore each variable access has to be converted into an SPI transaction. However for fun and learning this could be implemented. We do consider this fun approach to be out of scope of IDF project, and will support PSRAM only on chips which have hardware support for it. |
@igrr Thank you very much for such clear explanation
I understand that it is some kind of not-good workaround. Am i right that if we use PSRAM hardware support it should be a full-fledged hardware processing of memory commands over the spi protocol + some kind of caching? |
You are right, In ESP32, ESP32-S2 and ESP32-S3 there is a dedicated hardware block which is mapped into the CPU address space. It receives load and store requests from the CPU, performs address translation and caching, and services cache misses by sending SPI transactions to PSRAM. It's roughly the same thing that is used for code execution from Flash, which is also cached and mapped into the CPU address space. The main difference is that Flash is mapped as read-only, while PSRAM supports both reads and writes. Hence the related hardware and the cache have to be more complex to support PSRAM. |
Hello!
I didn't sure that it is esp-idf question, but seems like this is related to software architecture.
I can't find any information about external SPIRAM support on ESP32-CX SoCs family.
All data sheets that i see missed this information.
This can mean 2 options:
Could you please help with understand this things?
Does ESP32-CX (for example ESP32-C6) supports external SPIRAM?
Apologise if this question is not related to esp-idf
The text was updated successfully, but these errors were encountered: