How to Flash ESP32-S2 / Wemos S2 mini v1.0.0 purple pcb with usb-c

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
grundy
Normal user
Posts: 9
Joined: 01 Jul 2019, 22:08

How to Flash ESP32-S2 / Wemos S2 mini v1.0.0 purple pcb with usb-c

#1 Post by grundy » 01 Jul 2022, 20:29

hello everyone,

i recently got these wemos s2 mini boards wich are nice because of the high gpio count but i cant really get it to work, did anyone get one of these running?

i connected the board to a win10 pc then holding 0 button - press rst button - release 0 button to put it in download mode -> serial port comes up on the pc

first i tried with the expressif 3.8.5 downloadtool from the espeasy release, it has a s2 button but does not work with the s2 over usb, so i got the 3.9.2 from the expressif site
there i (think i ) could download the (EDIT, wrong filename earlier ) ESP_Easy_mega_20220616_normal_ESP32s2_4M316k.factory.bin to address 0 , at least it gave no errors.

so finally i press reset on the board but then nothing happens , the serial port disappears so i cant get any output, no wlan appears and i cant enter settings to connect to my routers wlan -> how to continue at this point?

do i need to get an additional usb-serial and connect it to the board to enter settings or did i anything wrong because no ap appears ? hope anyone has a little hint for me ^^
Last edited by grundy on 01 Jul 2022, 22:12, edited 1 time in total.

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

Re: How to Flash ESP32-S2 / Wemos S2 mini v1.0.0 purple pcb with usb-c

#2 Post by Ath » 01 Jul 2022, 22:03

On an ESP32s2 board you must use an ESP32s2 build, as that CPU isn't compatible with the 'regular' ESP32 CPU. There are a few builds available that support the ESP32s2.
The princple of flashing the factory.bin at address 0x0000 is correct though :idea:

NB: I'm running a NeoPixel build here, as my s2 board as such pixel on-board :D
/Ton

grundy
Normal user
Posts: 9
Joined: 01 Jul 2019, 22:08

Re: How to Flash ESP32-S2 / Wemos S2 mini v1.0.0 purple pcb with usb-c

#3 Post by grundy » 01 Jul 2022, 22:10

sorry i copied the wrong filename in the post earlier, of course i used
ESP_Easy_mega_20220616_normal_ESP32s2_4M316k.factory.bin

i hope the esp easy flasher tool supports the esp32 boards too one day , would make things easier ;-)

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

Re: How to Flash ESP32-S2 / Wemos S2 mini v1.0.0 purple pcb with usb-c

#4 Post by Ath » 01 Jul 2022, 22:27

The flashtool should support the ESP32s2, though my initial flash is usually via VSCode, as I'm in 'developer mode' :D
AFAIK, the Espressif flasher does support the s2, so that should work as expected. You might want to check the 'DoNotChgBin' checkbox, that may help
/Ton

MagTer
Normal user
Posts: 4
Joined: 14 Aug 2022, 22:16

Re: How to Flash ESP32-S2 / Wemos S2 mini v1.0.0 purple pcb with usb-c

#5 Post by MagTer » 14 Aug 2022, 22:28

I'm new to ESPEasy but i have it running on a couple of Wemos D1 mini's. When installing the images on the D1's I used the ESP.Easy.Flasher were the com port was identified and i just selected the "normal" build for my chip.

I tried the same on one of my S2 mini boards but the tool does not recognize the Com-port even though windows shows them as available. One in normal mode and another one in flash mode.
I have seen that there are other tools available for flashing, but so far the newbie in me, does not feel comfortable with espressif_flash tool.

Is there any way to have the ESP.Easy.Flasher identify/support the S2 Mini COM ports?

Just to clear out missunderstandings, I am using the ESP32 build, targeting to use the ESP32s2 image.

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

Re: How to Flash ESP32-S2 / Wemos S2 mini v1.0.0 purple pcb with usb-c

#6 Post by Ath » 14 Aug 2022, 22:36

If the COM port is not detected, that's a known issue with the ESPEasyFlasher as it doesn't seem to correctly identify some types of serial drivers, unfortunately.
Best alternative is to download the Espressif Windows flash tool from here, as that seems to be better in recognizing the COM ports.
/Ton

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

Re: How to Flash ESP32-S2 / Wemos S2 mini v1.0.0 purple pcb with usb-c

#7 Post by Ath » 14 Aug 2022, 22:39

NB: For any ESP32 based build, using the serial flash tool it requires to use a firmware name ending with factory.bin, and flashing it at address 0x0000, as it already includes the required boot and other partitioning data.
When later upgrading the unit you can use the OTA upgrade from the Tools page, using the regular .bin file (without factory in the name)
/Ton

MagTer
Normal user
Posts: 4
Joined: 14 Aug 2022, 22:16

Re: How to Flash ESP32-S2 / Wemos S2 mini v1.0.0 purple pcb with usb-c

#8 Post by MagTer » 15 Aug 2022, 15:52

I managed to flash the card but I must have done something wrong since now I can only get the COM port show up in windows when the card is in flashing mode.
The normal mode COM port never shows up so I cant connect and configure it.

Image flashed: ESP_Easy_mega_20220809_normal_ESP32s2_4M316k.factory.bin
Address: 0x0000
SPI Speed: 40
SPI Mode: DIO
DoNotChgBin: Checked

Any documentation available with the correct settings for the S2 mini?

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

Re: How to Flash ESP32-S2 / Wemos S2 mini v1.0.0 purple pcb with usb-c

#9 Post by TD-er » 15 Aug 2022, 16:26

Usually connecting GPIO-0 to GND at boot (or power cycle) will let the unit enter flash mode.

However, the S2 does have support for native USB, which is not implemented in ESPEasy.
I never tried using the native USB port option of that chip. If this is the only way how your board is connected to the USB port, then I hope it will enter this flashing mode again when pulling GPIO-0 down to GND.

The only S2 boards I used so far have an external USB to serial chip.

Do you have a link to this board?

MagTer
Normal user
Posts: 4
Joined: 14 Aug 2022, 22:16

Re: How to Flash ESP32-S2 / Wemos S2 mini v1.0.0 purple pcb with usb-c

#10 Post by MagTer » 15 Aug 2022, 17:11

Here is the link to wemos page on it: https://www.wemos.cc/en/latest/s2/s2_mini.html

It has a button that can be pressed during boot/reset for entering Device Firmware Upgrade (DFU) mode and i would guess that connects GPIO0 to GND?
When in that mode, I get the COM port in windows and i can flash the image as per above post.

However, when i reboot without pressing the DFU mode button i dont get anything so i suspect that the image is not correctly written by me based on that I am setting something wrong.

Screenshot:
Screenshot.png
Screenshot.png (39.71 KiB) Viewed 1373 times
Last edited by MagTer on 15 Aug 2022, 17:58, edited 1 time in total.

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

Re: How to Flash ESP32-S2 / Wemos S2 mini v1.0.0 purple pcb with usb-c

#11 Post by Ath » 15 Aug 2022, 17:23

a) You can attach screenshots as attachments in the Forum, your pasteboard link will probably expire soon, and we won't be able to see it anymore.

b) If the serial chip isn't external, ESPEasy won't know how to initialize that properly, so there will be no serial port.
When using a phone, tablet or laptop, can you detect a WiFi access point named ESPEasy (or similar, it depends on the build) that you can connect to?
When logging in to that AP using the password configesp (all lowercase) you will be presented the setup screen for ESPEasy, that enables you to select your WiFi the device should connect to, enter the password, and it should report the IP address it has obtained.
If you can't find the IP address there, you can probably get it from the WiFi router admin screen, or by using a network scanner like Fing.
/Ton

MagTer
Normal user
Posts: 4
Joined: 14 Aug 2022, 22:16

Re: How to Flash ESP32-S2 / Wemos S2 mini v1.0.0 purple pcb with usb-c

#12 Post by MagTer » 15 Aug 2022, 17:54

Thanks, I will update the previous post with the image as an attachment. Since it worked it might help someone else.

I used "post flash actions" when installing my D1 boards to configure wifi so I didn't think of the AP mode.
I was set on finding that com port to send the post flash action commands myself.

The WLAN is indeed available. Configuration went smooth now. Thanks.

grundy
Normal user
Posts: 9
Joined: 01 Jul 2019, 22:08

Re: How to Flash ESP32-S2 / Wemos S2 mini v1.0.0 purple pcb with usb-c

#13 Post by grundy » 22 Aug 2022, 23:42

i finally hooked up an external serial/usb chip but i dont get anything readable out, no matter what baudrate i use.

i can flash the esp with the tool after entering the flash mode, but after the flash cycle the esp just does nothing, no wlan, nothing on the serial pins. also i cant flash it using the external chip, only getting errors. i will try using another chip, something just doesnt work here, cant figure out where the error lies..

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

Re: How to Flash ESP32-S2 / Wemos S2 mini v1.0.0 purple pcb with usb-c

#14 Post by TD-er » 22 Aug 2022, 23:56

Is the GPIO-0 pin pulled up after flash? (pulled to 3V3 using a resistor like a 10k one)

Which firmware do you flash to it? (it is an ESP32-S2, which is not the normal ESP32)

Can you see some text on the ESP module or chip?

Also can you try one of the latest GH Actions builds, like this one for example: https://github.com/letscontrolit/ESPEas ... 2906982945

I have been working the last few days on flash/SPI specific issues as there have been some issues where the flash settings were not correct for some boards.

Xstrudel
Normal user
Posts: 2
Joined: 28 May 2017, 06:59

Re: How to Flash ESP32-S2 / Wemos S2 mini v1.0.0 purple pcb with usb-c

#15 Post by Xstrudel » 06 Sep 2022, 06:47

I attempted all flash tools mentioned in this thread without success. This worked to install an appropriate ESP32s2_4M316k.bin that I wanted.

1) Connect ESP32-S2 mini to your PC. While holding the "0" button tap the "RST" button. Open Device Manager in windows and look at Ports (COM & LPT) to check if there is a COM port named ESP32-S2. If you do not see an ESP32-S2 present, you may need to change the driver to enable it so it will show up as a COM port. I Used Zadig https://zadig.akeo.ie/ and set the driver for the ESP32-S2 to USB Serial (CDC).

2) Use the Web based flash tool https://td-er.nl/ESPEasy/ to install ESPEasy .bin to the ESP32-S2. There was only one installation .bin file listed for ESP32-S2-4M device, so I went ahead and installed that. The flash worked!

3) Log into the ESP32-S2, connect it to your wifi network.

4) Using the ESPEasy GUI, go to the "Tools" menu. Find "Update Firmware" and flash an ESP_Easy_mega_YYYYMMDD_normal_ESP32s2_4M316k.bin that you have downloaded to your PC from the ESPEasy Github releases https://github.com/letscontrolit/ESPEasy/releases. The ESP32-S2 mini will now have that bin installed.

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

Re: How to Flash ESP32-S2 / Wemos S2 mini v1.0.0 purple pcb with usb-c

#16 Post by TD-er » 06 Sep 2022, 08:46

Which reminds me... I need to update that flash page as it has both an older version of the flash tool and older bin files.


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

Re: How to Flash ESP32-S2 / Wemos S2 mini v1.0.0 purple pcb with usb-c

#18 Post by TD-er » 08 Sep 2022, 09:59

Hmm that's inetresting. I have never seen just the ESP32-S2 chip. Only modules from Espressif containing such a chip.
So apparently the S2 does have 2M PSRAM and 4M flash on board. Or at least this chip used here does have these all included.

This makes sense as there is quite a lot of difference in quality among flash chips so I'm glad these will be consistant in quality and the way these chips are connected to the ESP.

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 1 guest