Since it is the only thing we need in this memory area, we tried to use the simple method of integrating the SPI ram into the memory map, and access it with pointers. Note that the integrated SPI ram test is enabled and succeeds ("spiram: Found 16MBit SPI RAM device")
Using Menuconfig>Component Config>ESP32S3-Specific>SPI RAM config>SPI RAM access method>Integrate RAM into memory map
From https://docs.espressif.com/projects/esp ... l-ram.html
So the most simple test; read 16 bytes starting from 0x3D000000, overwrite them, read them again: https://pastebin.com/mX1CKhhADuring the ESP-IDF startup, external RAM is mapped into the data address space, starting at address 0x3D000000 (byte-accessible)
This is it's log-output (after the usual bootloader stuff):
It doesnt even print the first byte.I (0) cpu_start: Starting scheduler on APP CPU.
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x8 (TG1WDT_SYS_RST),boot:0x28 (SPI_FAST_FLASH_BOOT)
Saved PC:0x42001d95
0x42001d95: panic_handler at /home/user/esp/esp-idf/components/esp_system/port/panic_handler.c:148 (discriminator 3)
Q1: Why does this fail? What needs to be done to make this work?
Q2: we have changed the setup, so we are instead using "Make RAM allocatable using heap_caps_malloc". When malloc'ing the required amount of memory, the first returned address is 0x3DE00974. Why does this not start at 0x3D000000? We have not done any special configuration to put espressif logic components into this memory (USB, BLE, WiFi disabled). And the module still panics when accessing 0x3D000000 with a raw pointer.
Q3: using the "integrated into memory map" method, it works fine using 0x3DE00000 as starting address. Maybe the documentation is wrong?