Instability with 120MHz Flash/SPIRAM on ESP32S3-WROOM-2 N32R8V

tulipcc
Posts: 8
Joined: Wed Oct 25, 2017 3:28 pm

Instability with 120MHz Flash/SPIRAM on ESP32S3-WROOM-2 N32R8V

Postby tulipcc » Mon Mar 25, 2024 1:15 pm

Hello, we're hoping to ship a product with 120MHz SPIRAM under ESP-IDF 5.2 on a ESP32S3-WROOM-2 N32R8V.

We're noticing an instability when these sdkconfig parameters are set:

Code: Select all

CONFIG_IDF_EXPERIMENTAL_FEATURES=y
CONFIG_SPIRAM_SPEED_120M=y
CONFIG_ESPTOOLPY_FLASHFREQ_120M=y
CONFIG_ESPTOOLPY_FLASHFREQ="120m"
With the same setup but 80M instead for both flash and SPIRAM, things are stable.

The instability happens at system boot, before a single line of our own code starts. It will crash with various and seemingly random errors, some examples (each line is a different crash)

Code: Select all

0x42004180: s_prepare_reserved_regions at /Users/bwhitman/esp/esp-idf-v5.2/components/heap/port/memory_layout_utils.c:93 (discriminator 1)

Guru Meditation Error: Core  0 panic'ed (IllegalInstruction). Exception was unhandled.
Memory dump at 0x40001c38: a0ffff91 0000000 fd
0x40001c38: __call__xtos_set_intlevel in ROM

0x4004794e: wdt_hal_write_protect_disable in ROM

0x42004468: get_desc_for_int at /Users/bwhitman/esp/esp-idf-v5.2/components/esp_hw_support/intr_alloc.c:158

0x42005b1d: usb_serial_jtag_write at /Users/bwhitman/esp/esp-idf-v5.2/components/vfs/vfs_usb_serial_jtag.c:149

A2      : 0x00000019  A3      : 0x3fc9d230  A4      : 0x40000000  A5      : 0x60038000  
0x40000000: _WindowOverflow4 in ROM

0x403743c0: _DoubleExceptionVector at /Users/bwhitman/esp/esp-idf-v5.2/components/xtensa/xtensa_vectors.S:564
Left alone, the system will eventually reboot enough to then become stable but sometimes takes many seconds. After the system "settles down" the SPIRAM is in fact working faster, and crashes do not happen after a stable boot.

None of these errors ever appear while running at 80M and none of them seem to have anything to do with our code. The temperature in the room is stable.

We've experienced this running just the simple hello_world example as well as our own code, as long as 120M SPIRAM/Flash is set up.

My gut feeling is maybe this is a brownout type failure on boot, where 120M is pulling more current in the bootloader? We're powering this with a 5V USB 2A wall wart, through a ME6217 regulator to 3.3v, with two 10uF caps from 3V3 to GND. I have a window now to make some changes to the board if there's a fix we can do to support the power.

Or could this be something else, and how can i help diagnose further?

chegewara
Posts: 2378
Joined: Wed Jun 14, 2017 9:00 pm

Re: Instability with 120MHz Flash/SPIRAM on ESP32S3-WROOM-2 N32R8V

Postby chegewara » Mon Mar 25, 2024 8:33 pm

This may be not the answer to your question, but you seem to be in better position than me.
On esp-idf master, maybe other versions too, esp32s3 v0.1 there is not a chance to run app with flash set to OPI 120MHz (F8R8 mode).
In F4R8 mode, flash 40MHz and PSRAM 120MHz my psram is not detected properly.

I have devkit with the same ESP32S3-WROOM-2 N32R8V module, just v0.1.

User avatar
jgustavoam
Posts: 165
Joined: Thu Feb 01, 2018 2:43 pm
Location: Belo Horizonte , Brazil
Contact:

Re: Instability with 120MHz Flash/SPIRAM on ESP32S3-WROOM-2 N32R8V

Postby jgustavoam » Thu Apr 04, 2024 9:54 pm

Hi,
Reading at "SPI Flash and External SPI RAM Configuration" topic:

https://docs.espressif.com/projects/esp ... onfig.html

Important

120 MHz DDR mode is an experimental feature. You will only see it when:

CONFIG_IDF_EXPERIMENTAL_FEATURES is enabled

With above step, you will find 120 MHz option is visible.

Risks:

If your chip powers on at a certain temperature, then after the temperature increases or decreases over 20 celsius degree, the accesses to/from PSRAM/Flash will crash randomly. Flash access crash will lead to program crash.

Note 20 celsius degree is not a totally correct number. This value may changes among chips.
Retired IBM Brasil
Electronic hobbyist since 1976.

tulipcc
Posts: 8
Joined: Wed Oct 25, 2017 3:28 pm

Re: Instability with 120MHz Flash/SPIRAM on ESP32S3-WROOM-2 N32R8V

Postby tulipcc » Mon Apr 15, 2024 12:55 pm

Thank you jgustavoam

I have CONFIG_IDF_EXPERIMENTAL_FEATURES on, and the temperature is stable. This is happening on boot, not during continued operation, so temperature is not the issue.

LiliumJSN
Posts: 1
Joined: Wed Oct 05, 2022 8:59 am

Re: Instability with 120MHz Flash/SPIRAM on ESP32S3-WROOM-2 N32R8V

Postby LiliumJSN » Wed Apr 24, 2024 10:08 am

I can verify another instance of this behavior. On some of our devices, boot is hanging with random error at "cpu_start:" area, before main, when 120MHz setting is enabled. If 80MHZ option is enable there is no issue on any of the samples. This only happens though on cold boot either through power on or RST pin reset. The issue is not happening on soft_reset through esp_restart which is strange.

Who is online

Users browsing this forum: Google [Bot] and 127 guests