Hi,
My application requires IRAM memory, but when I use heap_caps_calloc(1, 784, MALLOC_CAP_IRAM_8BIT) it returns 0.
This is on a WROVER.
When using heap_caps_calloc(1, 784, MALLOC_CAP_INTERNAL | MALLOC_CAP_8BIT) I get a valid return pointer.
Why the differences, what am I missing?
ESP32 WROVER reboots on heap_caps_calloc(MALLOC_CAP_IRAM_8BIT)
-
- Posts: 1726
- Joined: Mon Oct 17, 2022 7:38 pm
- Location: Europe, Germany
Re: ESP32 WROVER reboots on heap_caps_calloc(MALLOC_CAP_IRAM_8BIT)
From the TRM: "The CPU can read and write data through the instruction bus, but only in a word aligned manner; non-word-aligned access will cause a CPU exception."
Hence, CAP_IRAM + 8BIT is not valid/possible on the ESP32.
See also https://esp32.com/viewtopic.php?t=23891#p94825
Hence, CAP_IRAM + 8BIT is not valid/possible on the ESP32.
See also https://esp32.com/viewtopic.php?t=23891#p94825
-
- Posts: 190
- Joined: Wed Jan 24, 2018 6:51 am
Re: ESP32 WROVER reboots on heap_caps_calloc(MALLOC_CAP_IRAM_8BIT)
Hello,
It is possible to allocate memory from ESP32 IRAM region in FreeRTOS unicore mode with certain performance penalty. Please refer to https://docs.espressif.com/projects/esp ... ble-memory.
It is possible to allocate memory from ESP32 IRAM region in FreeRTOS unicore mode with certain performance penalty. Please refer to https://docs.espressif.com/projects/esp ... ble-memory.
Mahavir
https://github.com/mahavirj/
https://github.com/mahavirj/
Who is online
Users browsing this forum: ESPBoards and 195 guests