Skip to content

feat(esp32s3): add PSRAM support#5554

Draft
digitalentity wants to merge 1 commit into
tinygo-org:devfrom
helvionics:de_esp32s3_psram
Draft

feat(esp32s3): add PSRAM support#5554
digitalentity wants to merge 1 commit into
tinygo-org:devfrom
helvionics:de_esp32s3_psram

Conversation

@digitalentity

@digitalentity digitalentity commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Very naive QSPI PSRAM support for ESP32-S3. Enabled via numa_psram build tag. Not tested yet.

Caveats:

  • Linker script can be consolidated if we limit the maximum image size to 8M.
  • OctoSPI (ESP32-S3-DevKitC-1-N8R8 / N16R8) is not supported, it needs a very different init sequence and a separate build tag (something like numa_psram_opi).

Partly fixes #3772

Runtime detection and MMU mapping for quad PSRAM on ESP32-S3.
Fix SPI busy-wait to check CMD_USR bit instead of reserved bit 0.
Suspend DCache before MMU table writes and configure MSPI clock for PSRAM.
Verify PSRAM zero-init with write/readback to detect hardware faults.
Separate linker script (esp32s3-psram.ld) shrinks DROM to 8M and adds
PSRAM region, keeping non-PSRAM targets unaffected.
@digitalentity
digitalentity marked this pull request as draft July 24, 2026 22:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

How to use esp32 psram?

1 participant