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

ESP32-S3 with Octal SPI RAM - Freezes During Boot #83743

Open
Piziwate opened this issue Jan 9, 2025 · 3 comments · May be fixed by #83817
Open

ESP32-S3 with Octal SPI RAM - Freezes During Boot #83743

Piziwate opened this issue Jan 9, 2025 · 3 comments · May be fixed by #83817
Labels
bug The issue is a bug, or the PR is fixing a bug

Comments

@Piziwate
Copy link
Contributor

Piziwate commented Jan 9, 2025

Describe the bug
When I compile the hello_world example with PSRAM enabled in octal mode, the startup process freezes during initialization. This issue is reproducible on the esp32s3_devkitc/esp32s3/procpu board. Module used: ESP32-S3-DevKitC-1-N32R8V.

The freeze occurs within the HAL at the file modules\hal\espressif\components\esp_psram\esp32s3\esp_psram_impl_octal.c. Specifically, it happens during a call to the method esp_opiflash_set_required_regs(), where the s_chip_func function is NULL and the s_chip_id variable is set to 0.

I don't quite understand the connection between flash initialization and SPI RAM in this case.

To Reproduce

  1. west build -b esp32s3_devkitc/esp32s3/procpu ./samples/hello_world/ --pristine -DCONFIG_ESP_SPIRAM=y -DCONFIG_SPIRAM_TYPE_ESPPSRAM64=y -DCONFIG_SPIRAM_MODE_OCT=y -DCONFIG_SPIRAM_SPEED_80M=y -DCONFIG_ESPTOOLPY_FLASHMODE_OPI=y
  2. west flash
  3. Boot process hangs after outputing (276) MSPI Timing: PSRAM timing tuning index: 5

Expected behavior
The system should boot and display the message:
Hello World! esp32s3_devkitc/esp32s3/procpu

Impact
The good news is that you have a work-around by commenting out the line ((*s_chip_func)->regs_set(s_chip_id)) in the HAL.
But it would be ideal to optimize this case to prevent issues for other users.

Logs and console output
Full boot log : bootlog.txt

Environment (please complete the following information):

  • OS: Windows 11
  • Zephyr SDK : zephyr-sdk-0.16.8 & zephyr-sdk-0.17.0
  • Commit SHA or Version used : main branch
@Piziwate Piziwate added the bug The issue is a bug, or the PR is fixing a bug label Jan 9, 2025
@rftafas
Copy link

rftafas commented Jan 9, 2025

Can you also paste the boot log info? [edit] saw the link. no need to.

@sylvioalves
Copy link
Collaborator

Fixed, will submit it soon.

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]>
@sylvioalves
Copy link
Collaborator

@Piziwate @tyalie Would you be able to check #83817 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue is a bug, or the PR is fixing a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants