ESP32-S2 Embedded PSRAM

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
User avatar
Andrew Mamohin
Normal user
Posts: 65
Joined: 12 Jun 2020, 08:30
Location: Belarus, Gomel
Contact:

ESP32-S2 Embedded PSRAM

#1 Post by Andrew Mamohin » 13 Mar 2023, 13:59

I have different ESP32-S2 boards. The difference can be seen with esptool. This is the difference in the availability of PSRAM.

Code: Select all

esptool.py v4.5.1
Serial port COM41
Connecting...
Detecting chip type... Unsupported detection protocol, switching and trying again...
Detecting chip type... ESP32-S2
Chip is ESP32-S2FH4 (revision v0.0)
Features: WiFi, Embedded Flash 4MB, No Embedded PSRAM, ADC and temperature sensor calibration in BLK2 of efuse V1

Code: Select all

esptool.py v4.5.1
Serial port COM41
Connecting...
Detecting chip type... Unsupported detection protocol, switching and trying again...
Detecting chip type... ESP32-S2
Chip is ESP32-S2FNR2 (revision v0.0)
Features: WiFi, Embedded Flash 4MB, Embedded PSRAM 2MB, ADC and temperature sensor calibration in BLK2 of efuse V2
The board on which the "Embedded PSRAM" works fine with all firmwares, including EspEasy. The board on which "No Embedded PSRAM" does not work anywhere. I even tried to flash the WEB-server example from arduino. It works on the board with PSRAM, but does not work without PSRAM.
I tried flashing LED on a board which "No Embedded PSRAM". Yes, it works. It seems that only WI-FI is not working

Unfortunately these boards don't have a hardware com port so I can't see the espeasy log. What can be done with such boards? Maybe you can fix EspEasy for use with such boards?
Andy.

User avatar
Ath
Normal user
Posts: 2540
Joined: 10 Jun 2018, 12:06
Location: NL

Re: ESP32-S2 Embedded PSRAM

#2 Post by Ath » 13 Mar 2023, 14:52

Actually, ESPEasy should automatically take care of the with/without PSRAM configuration. For ESP32 that is already working as intended. I don't own an ESP32s2 board without PSRAM though, so I can't verify.
/Ton (PayPal.me)

User avatar
Andrew Mamohin
Normal user
Posts: 65
Joined: 12 Jun 2020, 08:30
Location: Belarus, Gomel
Contact:

Re: ESP32-S2 Embedded PSRAM

#3 Post by Andrew Mamohin » 13 Mar 2023, 15:20

Ath wrote: 13 Mar 2023, 14:52 I don't own an ESP32s2 board without PSRAM though, so I can't verify.
But I have such a board. My friend has 6 of these boards... :(
What to do? Is it possible to make firmware specifically for such a board? I would test this.
Andy.

User avatar
Ath
Normal user
Posts: 2540
Joined: 10 Jun 2018, 12:06
Location: NL

Re: ESP32-S2 Embedded PSRAM

#4 Post by Ath » 13 Mar 2023, 15:27

Well, as said, it should work out of the box.

But if it won't even work with standard Arduino examples, then maybe something is broken in the Arduino libraries, that may need fixing first, before it can work with other firmwares.
/Ton (PayPal.me)

TD-er
Core team member
Posts: 7502
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: ESP32-S2 Embedded PSRAM

#5 Post by TD-er » 13 Mar 2023, 15:36

Let's move back one more step...
How is the USB connected to the ESP?
ESP32-S2 (and others which we don't yet support...) can be wired in 2 ways:
- Directly to USB, where the ESP does emulate an USB device
- External USB to UART chip, like the familiar CH340 and the 210x.

The one that needs to emulate an USB device, can only be flashed via this USB chip to ESPEasy once, as I don't (yet) support this serial port emulation.
See: https://github.com/letscontrolit/ESPEasy/issues/4493

User avatar
Andrew Mamohin
Normal user
Posts: 65
Joined: 12 Jun 2020, 08:30
Location: Belarus, Gomel
Contact:

Re: ESP32-S2 Embedded PSRAM

#6 Post by Andrew Mamohin » 13 Mar 2023, 16:00

TD-er wrote: 13 Mar 2023, 15:36 - Directly to USB, where the ESP does emulate an USB device
IMG_20230313_175456.jpg
IMG_20230313_175456.jpg (77.91 KiB) Viewed 133 times
Here are the boards. It's strange, I already flashed them with different firmware, including just from the Arduino IDE, the LED blinked.
It seems that WIFI just does not work in any firmware.
My friend did the same with his boards.

I flash the boards directly through the USB-C. When I press the "0" button when the board is turned on, I get a COM-port.
Andy.

TD-er
Core team member
Posts: 7502
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: ESP32-S2 Embedded PSRAM

#7 Post by TD-er » 13 Mar 2023, 16:10

If you have a sketch running which does not enable the USB emulation and the bootloader is erased, you might not be able to flash them with anything else via the USB port anymore.
The only way to get them to flash again is wiring up an USB to serial adapter to the pins of Serial0 and toggle the reset/GPIO-0 pin at power on.

I'm not 100% sure how these chips have the internal PSRAM wired.
It could be these boards have them wired to the same SPI bus as the (also internal) flash, which means there is probably some GPIO pin internally wired as CS for the PSRAM.
No idea which pin that might be and also no idea whether this pin is then wired on the outside too.
But maybe we should (in ESPEasy) specifically pull up or down some pin when enabling PSRAM on these boards?

I guess I should also order a few of these boards with PSRAM too when starting to implement support for the USB emulation as described in the issue I linked.

User avatar
Andrew Mamohin
Normal user
Posts: 65
Joined: 12 Jun 2020, 08:30
Location: Belarus, Gomel
Contact:

Re: ESP32-S2 Embedded PSRAM

#8 Post by Andrew Mamohin » 13 Mar 2023, 18:23

TD-er wrote: 13 Mar 2023, 16:10 I guess I should also order a few of these boards with PSRAM too when starting to implement support for the USB emulation as described in the issue I linked.
Problems occur when trying to use the boards without PSRAM. Тhe boards with PSRAM work fine.
But, when buying on Ali, you can randomly buy different boards.
Andy.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest