vcc-gnd / YD-ESP32-S3

YD-ESP32-S3 Micropython VCC-GND Studio
98 stars 21 forks source link

N8R2 PSRAM ID read error #15

Open Omirax opened 3 months ago

Omirax commented 3 months ago

Hello!

I have 2x N8R2. After flash YD-ESP32-S3-N8R2-MPY-V1.1.bin

[22:41:37]ESP-ROM:esp32s3-20210327
[22:41:37]Build:Mar 27 2021
[22:41:37]rst:0x1 (POWERON),boot:0x8 (SPI_FAST_FLASH_BOOT)
[22:41:37]SPIWP:0xee
[22:41:37]mode:DIO, clock div:1
[22:41:37]load:0x3fce3808,len:0xf24
[22:41:37]load:0x403c9700,len:0xc44
[22:41:37]load:0x403cc700,len:0x2d74
[22:41:37]entry 0x403c98f4
[22:41:37]E (243) psram: PSRAM ID read error: 0x00ffffff
[22:41:37]E (243) spiram: SPI RAM enabled but initialization failed. Bailing out.
[22:41:37]E (10) spiram: SPI RAM not initialized
[22:41:37]
[22:41:37]abort() was called at PC 0x42006940 on core 1
[22:41:37]
[22:41:37]
[22:41:37]Backtrace:0x40375c3e:0x3fce4b900x403824a5:0x3fce4bb0 0x403888d6:0x3fce4bd0 0x42006940:0x3fce4c40 0x42007157:0x3fce4c60 
[22:41:37]
[22:41:37]
[22:41:37]
[22:41:37]
[22:41:37]ELF file SHA256: c7c606756726b3c0
[22:41:37]
[22:41:37]Rebooting..

After flash YD-ESP32-S3-N8R8-MPY-V1.1.bin I have

22:46:30.183 -> ESP-ROM:esp32s3-20210327
22:46:30.183 -> Build:Mar 27 2021
22:46:30.183 -> rst:0x1 (POWERON),boot:0x8 (SPI_FAST_FLASH_BOOT)
22:46:30.183 -> SPIWP:0xee
22:46:30.183 -> mode:DIO, clock div:1
22:46:30.183 -> load:0x3fce3808,len:0xf24
22:46:30.223 -> load:0x403c9700,len:0xc44
22:46:30.223 -> load:0x403cc700,len:0x2d74
22:46:30.223 -> entry 0x403c98f4
22:46:30.554 -> MicroPython v1.19.1 on 2022-09-23; YD-ESP32S3-N8R8 with ESP32S3R8
22:46:30.554 -> Type "help()" for more information

And I'm not sure if spram was initialized or not. What am I doing wrong?

robertlipe commented 1 month ago

R2 boards are qspi, not ospi.

Relevant section of platformio.ini-like file for a similar (NOT identical) board, but using the same basic SPI configuration:

[dev_esp32-s3-n16r2]
extends         = dev_esp32-s3
build_flags     = -DUSE_PSRAM=1
                  -DBOARD_HAS_PSRAM=1
                  ${dev_esp32-s3.build_flags}
board_build.arduino.memory_type = qio_qspi
board_build.partitions = default_16MB.csv
board_upload.flash_size = 16MB

[dev_yulc]
extends         = dev_esp32-s3-n16r2
build_unflags   = -DARDUINO_USB_MODE=1
build_flags     = -DARDUINO_USB_CDC_ON_BOOT=1 ; Counterintuitively, CDC = 1 lets USB Serial mode work.
                  -DARDUINO_USB_MODE=0 ; “Hardware CDC and JTAG” instead of "TinyUSB"
                  -DLED_PIN0=1 # These pins are defined by the hardware
                  -DLED_PIN1=2 # GPIO 2
                  ${dev_esp32-s3-n16r2.build_flags}

Adjust that build file to taste. The YULC section is just an example; the meat is in the first hunk.

Your logs show that you're building for R8 (OSPI) but your description says you're running R2 (QSPI). That's why it bootloops.