Moving a few functions into PSRAM

Bryght-Richard
Posts: 40
Joined: Thu Feb 22, 2024 3:59 pm

Moving a few functions into PSRAM

Postby Bryght-Richard » Wed Jun 26, 2024 5:42 pm

I'm using ESP32-S3 with QSPI flash and OSPI RAM. My ESP32-S3's internal ram are heavily used, and during QSPI updates(not sure if erase or write) my 250kbps UART ISR cannot empty the FIFO, and my thread gets FIFO errors. Would it make sense to move the involved functions into PSRAM, as I'm low on IRAM? I don't want to move everything using CONFIG_SPIRAM_FETCH_INSTRUCTIONS, is there a word like "noflash" for linker-fragment files, but that would move to psram instead?

MicroController
Posts: 1702
Joined: Mon Oct 17, 2022 7:38 pm
Location: Europe, Germany

Re: Moving a few functions into PSRAM

Postby MicroController » Wed Jun 26, 2024 6:39 pm

PSRAM is accessed through the cache just as flash is. During flash writes the cache is disabled/inaccessible, so neither code from flash nor from PSRAM would be available, leaving (internal) IRAM and ROM as the only places to run code from while updating flash.

Bryght-Richard
Posts: 40
Joined: Thu Feb 22, 2024 3:59 pm

Re: Moving a few functions into PSRAM

Postby Bryght-Richard » Thu Jun 27, 2024 3:41 pm

Thanks, I see now how the caches are connected in the TRM. I was hoping the ESP32-S3's dual caches would be connected as one cache for the Flash, and one for the PSRAM, and that perhaps PSRAM accesses could continue during Flash erase/programming operations, but I no longer think that would be the case.

Who is online

Users browsing this forum: No registered users and 93 guests