ESP32-S3-WROOM1 PSRAM I2S Audio Question

waszee
Posts: 5
Joined: Sat May 20, 2023 2:27 am

ESP32-S3-WROOM1 PSRAM I2S Audio Question

Postby waszee » Tue Sep 19, 2023 5:35 pm

I have built an internet radio application that currently runs on Arduino IDE with a ESP32-S3-WROOM2 Dev Board using the audo.h i2s routine, WIFI, and IR remote. I recently purchased some less costly Dev Boards that have ESP32-S3-WROOM1 and 16Mb Mem and 8 Ram. For the Wroom2 board I programmed with OPI PSRAM enabled and OPI 80MHZ flash mode. On the WROOM1 boards that does not work.
I get a serial info message back:

E (290) cpu_start: Octal Flash option selected, but EFUSE not configured!
abort() was called at PC 0x40376ef5 on core 0
Backtrace: 0x40377702:0x3fceb260 0x4037d1d5:0x3fceb280 0x40382e39:0x3fceb2a0 0x40376ef5:0x3fceb320 0x403cd6e7:0x3fceb350 0x403cd9a6:0x3fceb380 0x403c9911:0x3fceb4b0 0x40045c01:0x3fceb570 |<-CORRUPTED
ELF file SHA256: c4dd50560fb5055a
E (355) esp_core_dump_flash: Core dump flash config is corrupted! CRC=0x7bd5c66f instead of 0x0


If I change the flash to OIO 80MHZ and leave the OPI PSRAM enabled I get a message after connection to WIFI from the audo_info():

info PSRAM found, inputBufferSize: 638965 bytes
Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled.


If I just disable the PSRAM I also get a message after WIFI connection:

info PSRAM not found, inputBufferSize: 14399 bytes
Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled.

The crash occurs when audio connect to host is made. The WIFI connection is established and working at that point. Interestingly I imported the arduiono wifi audio application to Platformio IDE using an Adafruit Feather s3 with PSRAM board option and the program ran once but on reboot failed and I have not been successful getting it to run after that one time.

I would appreciate any suggestions for how to configure the EFUSE or other comments on enabling PSRAM that readers might have. I think th eWROOM2 had 1.8V PSRAM but I do not know what the WROOM1 has. My guess is 3.3V. How do I tell?
 

ESP_Sprite
Posts: 9766
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP32-S3-WROOM1 PSRAM I2S Audio Question

Postby ESP_Sprite » Wed Sep 20, 2023 2:21 am

Looking at the datasheet, 16MiB flash and 8MiB psram wroom-1 modules actually come with octal PSRAM. If that's the case, it may be as easy as burning that eFuse as mentioned; see here, specifically step 2 for details.

waszee
Posts: 5
Joined: Sat May 20, 2023 2:27 am

Re: ESP32-S3-WROOM1 PSRAM I2S Audio Question

Postby waszee » Wed Sep 20, 2023 8:35 pm

Tried the EFUSE command: espefuse.py -p /dev/<serial_device> --do-not-confirm burn_efuse FLASH_TYPE 1
That has resulted in a new problem. I now get the following MD5 fatal crash. Am I totally dead now with this board? Changing the connection cord did not help. FYI - Using the i2saudio demo example and select no PSRAM ESP32S3 dev kit board in Platformio I had working program. The same program did not work in Arduino IDE and codes needing a bigger buffer did not work so tried to fix the PSRAM. Anyway now getting this and stuck:

Writing at 0x00000000... (100 %)
Wrote 15088 bytes (10373 compressed) at 0x00000000 in 0.4 seconds (effective 294.1 kbit/s)...
File md5: c3cedc4f2003b62214fa8b0bbd6b1318
Flash md5: ab142269856a78b314a17f1236bf351a
MD5 of 0xFF is ab142269856a78b314a17f1236bf351a

A fatal error occurred: MD5 of file does not match data in flash!
*** [upload] Error 2

ESP_Sprite
Posts: 9766
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP32-S3-WROOM1 PSRAM I2S Audio Question

Postby ESP_Sprite » Thu Sep 21, 2023 2:34 am

That means the flash was erased, but not written. Just to check: are you absolutely 100% sure the chip is 16M flash, 8M psram?

Edit: Ah crap, I made a mistake, I should have never advised you to burn that eFuse. I think I went with what you stated in your top post and assumed the flash in the Wroom-1 was octal, however the datasheet clearly states that the flash in that module is *quad* SPI, so you trying to set that to any octal protocol in ESP-IDF was never going to work. My mistake was not spotting that error and assuming it was a module with octal flash that somehow did not have that fuse burned. I'm terribly sorry, but I fear burning that fuse killed your ESP32 module :/

waszee
Posts: 5
Joined: Sat May 20, 2023 2:27 am

Re: ESP32-S3-WROOM1 PSRAM I2S Audio Question

Postby waszee » Thu Sep 21, 2023 2:39 pm

I sent an update last night but it is not posted so will summarize what i learned again and thanks for the support. I was reluctant to try some things and have learned a lot from the experience. First, I should have used the esptool.py -p COMX flash_id command line. It shows that the WROOM2 used 32MB octal flash and 8 Mb octal 1.8V PSRAM. An undamaged WROOM1 has 16 Mb quad flash and 8 Mb 3.3V Octal PSRAM. And my now damaged WROOM1 after using the espefuse.py command has efuse set as octal Flash and octal PSRAM. Unfortunately the board actually has quad flash so yes the command was wrong even though the compiler error message said the octal PSRAM was not configured in EFUSE. So I have learned about EFUSE.

I then went back to looking at Platformio board setting options and using my spare WROOM1 development board which has 16 MB quad flash and 8 mb octal PSRAM just as ESPsprite pointed out from the WROOM1 datasheet, which I did not have until the link above. I did find that Platformio IDE would allow me to work with the mixed memory types. I did not figure out how to do it in Arudino IDE. The platformio board settings are:
[env:adafruit_feather_esp32s3]
platform = espressif32
board = esp32-s3-devkitc-1
framework = arduino
build_flags = -DBOARD_HAS_PSRAM
board_build.arduino.memory_type = qio_opi
board_build.f_flash = 80000000L
board_build.flash_mode = qio
board_upload.flash_size = 16MB
lib_deps = esphome/ESP32-audioI2S@^2.0.7
lib_extra_dirs = ~/Documents/Arduino/libraries

I do not know if this would work in the ESP IDE.

Anyway have a board working and listening to internet radio as I write this.

Who is online

Users browsing this forum: No registered users and 64 guests