Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESP32S3: Octal SPI RAM support #64757

Open
tyalie opened this issue Nov 3, 2023 · 9 comments · May be fixed by #83817
Open

ESP32S3: Octal SPI RAM support #64757

tyalie opened this issue Nov 3, 2023 · 9 comments · May be fixed by #83817
Assignees
Labels
Feature Request A request for a new feature platform: ESP32 Espressif ESP32

Comments

@tyalie
Copy link
Contributor

tyalie commented Nov 3, 2023

Currently it is not possible to use the ESP32S3 variants with 8MB PSRAM. See issue #64510.
For me it breaks the use of PSRAM on the XIAO ESP32S3 boards I want to use.

The solution would be to be able to use PSRAM with octal spi.

@tyalie tyalie added the Feature Request A request for a new feature label Nov 3, 2023
@nordicjm nordicjm added the platform: ESP32 Espressif ESP32 label Nov 3, 2023
@lgl88911
Copy link
Collaborator

Any plans to support PSRAM for ESP32-S3? It's an important feature for this platform.

@rftafas
Copy link

rftafas commented Nov 29, 2023

@lgl88911 Octal PSRAM should be available when Zephyr starts supporting hal 5.1 - we are taking care of some regressions to make it usable as 'pre-alfa' in order to share a WIP / Draft PR.

@laurin
Copy link
Contributor

laurin commented Jan 11, 2024

Hey, is this still the latest status?

@rftafas
Copy link

rftafas commented Jan 11, 2024

@laurin yes, it is. We are wrapping up the last issues on hal5. You can try the current wip: #65942

@jadejr
Copy link

jadejr commented Jul 18, 2024

This is the PR #68760 for hal 5.1 that ended up being merged.

So, is this issue still valid? How would you enable it if you were using 3.7?

@rftafas
Copy link

rftafas commented Aug 8, 2024

PTAL CONFIG_SPIRAM_MODE_OCT

https://docs.zephyrproject.org/latest/kconfig.html#CONFIG_SPIRAM_MODE_OCT

You also need to enable PSRAM normally and do all other proper configurations.

Even though the implementation has bugs, I think this can be closed.

@EricNRS
Copy link
Contributor

EricNRS commented Jan 8, 2025

I am actively using octal SPIRAM on an ESP32-S3 N8R16 module using the xiao_esp32s3/esp32s3/procpu target and it works fine, so I think this issue can be closed now that HAL 5.x has been integrated.

@FacepalmMute
Copy link
Contributor

FacepalmMute commented Jan 10, 2025

It works!
But there seems to be a problem when using with mcuboot on my ESP32S3 N32R8V:

ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x1 (POWERON),boot:0x8 (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
Octal Flash Mode Enabled
For OPI Flash, Use Default Flash Boot Mode
mode:SLOW_RD, clock div:2
load:0x3fcb5400,len:0x2bc8
load:0x403ba400,len:0xa91c
load:0x403c6400,len:0x15f4
entry 0x403bd89c
I (93) boot: MCUboot 2nd stage bootloader
I (93) boot: compile time Jan 10 2025 12:40:29
W (93) boot: Unicore bootloader
W (93) spi_flash: Octal flash chip is using but dio mode is selected, will automatically swich to Octal mode
I (102) spi_flash: detected chip: mxic (opi)
I (106) spi_flash: flash io: opi_str
W (109) spi_flash: Detected size(32768k) larger than the size in the binary image header(2048k). Using the size in the binary image header.
I (122) boot: chip revision: v0.1
I (125) boot.esp32s3: Boot SPI Speed : 40MHz
I (129) boot.esp32s3: SPI Mode       : FAST READ
I (133) boot.esp32s3: SPI Flash Size : 32MB
I (137) boot: Enabling RNG early entropy source...
W (175) spi_flash: Octal flash chip is using but dio mode is selected, will automatically swich to Octal mode
E (176) spi_flash: failed to get chip size

Same sample works without sysbuild.
Can anyone confirm this?

Edit:
In main branch this issue seems to be fixed. This error is reproducible on v4.0.0.

@EricNRS
Copy link
Contributor

EricNRS commented Jan 10, 2025

That may be an octal flash issue and not PSRAM. A similar issue was opened yesterday here: #83743

sylvioalves added a commit to sylvioalves/zephyr that referenced this issue Jan 10, 2025
Make sure vector table and bss_start clean up
is performed pior hardwade initialization.

Fixes zephyrproject-rtos#83743 zephyrproject-rtos#64757

Signed-off-by: Sylvio Alves <[email protected]>
@sylvioalves sylvioalves linked a pull request Jan 10, 2025 that will close this issue
sylvioalves added a commit to sylvioalves/zephyr that referenced this issue Jan 10, 2025
Make sure vector table and bss_start clean up
is performed pior hardwade initialization.

Fixes zephyrproject-rtos#83743 zephyrproject-rtos#64757

Signed-off-by: Sylvio Alves <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request A request for a new feature platform: ESP32 Espressif ESP32
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants