Hi Espressif,
Could you please explain how to access or enable ESP32 WROVER PSRAM in Arduino IDE?
How to access or enable ESP32 WROVER PSRAM in Arduino IDE
-
- Posts: 826
- Joined: Mon Jul 22, 2019 3:20 pm
Re: How to access or enable ESP32 WROVER PSRAM in Arduino IDE
I assume you are using arduino-esp32 v2.0.2. If you choose the "ESP32 Wrover module" board, PSRAM will be automatically enabled. If you choose the "ESP32 Wrover Kit (all versions)", there is an option in the board menu to enable PSRAM. The memory will be initialized automatically as part of the initArduino() function.
PSRAM is used automatically for allocations greater than 16K bytes. If you want to ensure a smaller allocation uses psram, use the ps_malloc function (which behaves like a normal malloc).
I have posted an example that shows how to use a custom allocator to assign a std:: object (eg std::vector) into the psram. https://github.com/lbernstone/psram_custom_allocator/
PSRAM is used automatically for allocations greater than 16K bytes. If you want to ensure a smaller allocation uses psram, use the ps_malloc function (which behaves like a normal malloc).
I have posted an example that shows how to use a custom allocator to assign a std:: object (eg std::vector) into the psram. https://github.com/lbernstone/psram_custom_allocator/
Who is online
Users browsing this forum: No registered users and 79 guests