E (523) spiram: SPI RAM enabled but initialization failed. Bailing out.

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
User avatar
dps
Posts: 51
Joined: Mon Oct 28, 2019 9:37 pm

E (523) spiram: SPI RAM enabled but initialization failed. Bailing out.

Post by dps » Fri Nov 22, 2019 2:58 am

hi, i know that this is probably a dumb question, but im new to this and trying to get my bearings. the error that is the title of this post, this is caused by not actually having external spi ram? the board that i am using is the esp32 doit Image

i hope that the image posted correctly.

i have a few other esp32's, and i think that i may have this right (the fact that the external spi ram is indeed a PHYSICAL chip). i just think that i need to be told this, because the google results for "is external spiram a physical chip" dont bode well.

so, if i am right that this board just doesnt have this"external spi ram", i would flash the firmware that doesnt include it in the name, right?

User avatar
jimmo
Posts: 2754
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: E (523) spiram: SPI RAM enabled but initialization failed. Bailing out.

Post by jimmo » Fri Nov 22, 2019 4:13 am

Hi,

I think you might be confusing SPIRAM for SPIFLASH. Which are both external chips, but the external chip you see in that diagram in the bottom right hand corner is the USB interface. The SPIRAM/SPIFLASH chips are typically inside the metal can (i.e. inside the WROOM module itself).

The WROOM modules don't have SPIRAM, the WROVER modules do. They all have SPIFLASH. https://docs.espressif.com/projects/esp ... er-modules

User avatar
dps
Posts: 51
Joined: Mon Oct 28, 2019 9:37 pm

Re: E (523) spiram: SPI RAM enabled but initialization failed. Bailing out.

Post by dps » Fri Nov 22, 2019 6:26 am

ah yes, i think i may be confusing spi ram and spi flash. thank you for helping to clarify this :)
i think i see where my error in thinking is,somewhat at least lol. on a few esp32-cam boards that i have, they actually have an external SPIFLASH chip that is where (well, close to it anyway) the USB interface is on this one.
so, SPIRAM is external but inside of the shield typically, and so is SPIFLASH. All, boards have internal SPIFLASH, and some have SPIRAM, and some have external (outside of the metal can) SPIFLASH?
now im on to thinking about how or what part of the chip your interacting with when your using the REPL.

dps

User avatar
jimmo
Posts: 2754
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: E (523) spiram: SPI RAM enabled but initialization failed. Bailing out.

Post by jimmo » Fri Nov 22, 2019 9:56 am

ESP32 always has to have external spiflash. (With one exception, see note below) It optionally has external spiram. External here generally means still inside the metal can though.

Note: There is an ESP32 variant (i think it's the D2WD) that does have internal flash.

The ESP32 has a UART which MicroPython uses for the REPL. Almost all ESP32 boards include a USB/UART adaptor (e.g. an FTDI chip or CP2102 or similar) which is what is actually connected to your computer.

This is on contrast to STM32 boards (like the Pyboard) where the USB is actually handled by the main chip running MicroPython (which is why they can do things like show up as a USB storage device). I understand that future ESP32 versions might be able to do this too...

User avatar
jimmo
Posts: 2754
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: E (523) spiram: SPI RAM enabled but initialization failed. Bailing out.

Post by jimmo » Fri Nov 22, 2019 9:57 am

Another note, not all ESP32 boards use the modules in the metal cans. For example the TinyPico, where you can see all four chips separately:
- the esp32
- spiflash
- spiram
- cp2102 (or similar, i forget exactly)

User avatar
dps
Posts: 51
Joined: Mon Oct 28, 2019 9:37 pm

Re: E (523) spiram: SPI RAM enabled but initialization failed. Bailing out.

Post by dps » Fri Nov 22, 2019 7:46 pm

ok so, all esp32's need to have flash, and the DW2D actually has 2mib embedded INTO the esp32 chip itself?
i have these 2 esp32-s modules, that are mounted onto a breakout board for a camera and sd card. here is a picture of of one of the boards, where an external chip is (which is what i think i was confusing as SPIRAM in the beginning):Image

im looking at some info on the esp32-s, and it states that "Ai-Thinker's equivalent to Espressif's ESP-WROOM-32 module. (Same form factor and general specifications.)". so this would mean that, being a equivalent to the WROOM-32 module, it doesnt have any SPIRAM, correct? im wondering what this chip is then. i have another board that had one on it, but the board wouldnt accept an upload of any sketch i tried to throw at it in arduino, so i decided to pull the chip off and rip whatever was on it off with my ch341a programmer, but it doesnt recognize it as anything (at least through `flashrom`).

the datasheet for it (although in chinese) says that it has "520 KB SRAM and 4M PSRAM", and "32Mbit" of "SPI Flash".
now i am even more confused.

When we say "SPIFLASH" were talking about Flash memory correct? And SPIRAM, were talking about ram?
now, what about this pseudo s ram? could that be what is on this chip from IPUS?

User avatar
dps
Posts: 51
Joined: Mon Oct 28, 2019 9:37 pm

Re: E (523) spiram: SPI RAM enabled but initialization failed. Bailing out.

Post by dps » Fri Nov 22, 2019 7:58 pm

well, i guess it wont let me add a link to the picture of the IPUS chip thats on this board, must be because its pasteboard?

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: E (523) spiram: SPI RAM enabled but initialization failed. Bailing out.

Post by Roberthh » Fri Nov 22, 2019 8:22 pm

The ESP32 chip has 520k internal RAM directly connected to the parallel address- and data bus. SPIRAM or PSRAM is an external RAM chip connected with a serial SPI interface to the ESP32, similar to the SPI Flash chip. In the ESP32 DW2D with internal Flash this flash is also connected though a SPI interface. So the difference is packaging and not architecture.
P.S.: If you have a link to the picture, you can simply add the URL as text.

User avatar
dps
Posts: 51
Joined: Mon Oct 28, 2019 9:37 pm

Re: E (523) spiram: SPI RAM enabled but initialization failed. Bailing out.

Post by dps » Fri Nov 22, 2019 8:42 pm

AH! I get it now! I was just reading the datasheet on the ESP32 WROOM module, and was coming back here to ask for clarification on the whole "internal and external" ram stuff, and lo and behold youre already here, and have read my mind.
i was reading this part in particular:

`ESP32-D0WDQ6 contains two low-power Xtensa ® 32-bit LX6 microprocessors. The internal memory includes:
• 448 KB of ROM for booting and core functions.
• 520 KB of on-chip SRAM for data and instructions.
• 8 KB of SRAM in RTC, which is called RTC FAST Memory and can be used for data storage; it is accessed
by the main CPU during RTC Boot from the Deep-sleep mode.
• 8 KB of SRAM in RTC, which is called RTC SLOW Memory and can be accessed by the co-processor during
the Deep-sleep mode.
• 1 Kbit of eFuse: 256 bits are used for the system (MAC address and chip configuration) and the remaining
768 bits are reserved for customer applications, including flash-encryption and chip-ID.

and I was confused. thank you.
here is the link to the picture i took of the chip that i was talking about:
https://pasteboard.co/IHUQpZ1.jpg

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: E (523) spiram: SPI RAM enabled but initialization failed. Bailing out.

Post by Roberthh » Fri Nov 22, 2019 8:53 pm

Good picture. That chip is indeed a 8 MByte SPIRAM device.
Datasheet: http://platform.digiic.com/Docs/Product ... RAM%20.pdf

Post Reply