Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESP32-S2 (S2 Mini without PSRAM) does not show CircuitPython USB drive nor serial port #9924

Open
probonopd opened this issue Dec 29, 2024 · 8 comments
Labels
board New board or update to a single board bug esp32-s2
Milestone

Comments

@probonopd
Copy link

CircuitPython version

https://circuitpython.org/board/lolin_s2_mini/ 9.2.1

Code/REPL

None

Behavior

  • Windows 11
  • esptool.exe --chip esp32s2 --baud 460800 write_flash -z 0x0 combined.bin
  • Push reset
  • Blue LED comes up permanently, a drive D: shows up as "S2MINIBOOT"
  • Copy adafruit-circuitpython-lolin_s2_mini-en_US-9.2.1.uf2 to that drive. During the copy, the blue LED is flashing. After a while, the "device" removed sound plays and drive D: disappears
  • I would expect that a "device attached" sound would play and a CircuitPython drive would appear, but that does not happen

Description

No response

Additional information

TinyUF2 Bootloader 0.20.1 - tinyusb (heads/master)
Model: Lolin S2 Mini
Board-ID: ESP32S2FN4R2-S2Mini-1-0-0
Date: Sep  5 2024
Flash Size: 0x00160000 bytes
@probonopd probonopd added the bug label Dec 29, 2024
@probonopd
Copy link
Author

probonopd commented Dec 29, 2024

On https://circuitpython.org/board/lolin_s2_mini/ it says:

Note: update.uf2 files are not currently working on ESP32-S2 or ESP32-S3 boards.

Does this mean that copying adafruit-circuitpython-lolin_s2_mini-en_US-9.2.1.uf2 as described will NOT work? What is the correct procedure then?

Flashing adafruit-circuitpython-lolin_s2_mini-en_US-9.2.1.bin as follows will also NOT make a CircuitPython drive show up:

esptool.exe --chip esp32s2 --baud 460800 write_flash -z 0x0 adafruit-circuitpython-lolin_s2_mini-en_US-9.2.1.bin

But interesting the blue LED now pulsates (fades in and out) and a drive D: shows up as "S2MINIBOOT".

@probonopd
Copy link
Author

https://learn.adafruit.com/circuitpython-with-esp32-quick-start/overview says

It is important to remember that the ESP32 lacks native USB support and therefore no CIRCUITPY folder will show up. Loading CircuitPython firmware and getting wifi set up is done over a serial connection (a.k.a a COM port) instead of a folder.

If this is true, then this fact should imho be displayed very prominently on https://circuitpython.org/board/lolin_s2_mini/.

But at least the ESP32-S2 is capable of USB device mode (in fact, the uf2 bootloader is doing exactly that!), so what is holding it back from showing up as a CircuitPython USB device?

@probonopd
Copy link
Author

probonopd commented Dec 29, 2024

When using Thonny to update CircuitPython, I get

Downloading from https://downloads.circuitpython.org/bin/lolin_s2_mini/en_US/adafruit-circuitpython-lolin_s2_mini-en_US-9.2.1.uf2
(..)
100%Copying to D:\adafruit-circuitpython-lolin_s2_mini-en_US-9.2.1.uf2
Writing to D:\adafruit-circuitpython-lolin_s2_mini-en_US-9.2.1.uf2
100%
Waiting for the port...
Warning: Could not find port in 10 seconds

Resetting the device does NOT result in any activity of the blue LED and there is NO sound from Windows indicating a device is attached.

So also via the serial port no connection seems to be possible, leaving no way to use CircuitPython on the device.

@probonopd probonopd changed the title ESP32-S2 (LOLIN S2 Mini) does not show CircuitPython USB drive ESP32-S2 (LOLIN S2 Mini) does not show CircuitPython USB drive nor serial port Dec 29, 2024
@dhalbert
Copy link
Collaborator

Note: update.uf2 files are not currently working on ESP32-S2 or ESP32-S3 boards.

Does this mean that copying adafruit-circuitpython-lolin_s2_mini-en_US-9.2.1.uf2 as described will NOT work? What is the correct procedure then?

No, that remark is about the UF2 for updating the bootloader, not CircuitPython.

https://learn.adafruit.com/circuitpython-with-esp32-quick-start/overview says

It is important to remember that the ESP32 lacks native USB support and therefore no CIRCUITPY folder will show up. Loading CircuitPython firmware and getting wifi set up is done over a serial connection (a.k.a a COM port) instead of a folder.

If this is true, then this fact should imho be displayed very prominently on https://circuitpython.org/board/lolin_s2_mini/.

That remark is about the plain ESP32, which is a different chip than the ESP32-S2. The chip names are confusing.

@dhalbert
Copy link
Collaborator

I would expect that a "device attached" sound would play and a CircuitPython drive would appear, but that does not happen.

If you press reset or unplug and replug the device, does it then appear?

There may well be a bug. This board definition was contributed by a community member. It may also be that the specs of this board are different than the original. There are many variations and even sometimes counterfeits of these sorts of boards. Could you provide a link to the product page for what you bought?

@dhalbert dhalbert added board New board or update to a single board esp32-s2 labels Dec 29, 2024
@dhalbert dhalbert added this to the Support milestone Dec 29, 2024
@probonopd
Copy link
Author

probonopd commented Dec 29, 2024

Thanks @dhalbert for looking into this.

If you press reset or unplug and replug the device, does it then appear?

No.

There are many variations and even sometimes counterfeits of these sorts of boards. Could you provide a link to the product page for what you bought?

The board says "S2 Mini v1.0.0 WEMOS.CC" on the PCB. I got it from some Asian store a while ago. But again, since showing the USB drisk is working with the uf2 bootloader, I doubt it is a hardware issue.

My board may well be a "clone", since it looks like the one shown here.

esptool.py identifies it as:

esptool.py v4.8.1
Found 1 serial ports
Serial port COM12
Connecting...
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
Crystal is 40MHz

@bablokb
Copy link

bablokb commented Dec 29, 2024

I have a few of these boards. They are most probably counterfeits, unless you buy directly from the Wemos store.

Nevertheless, my boards work fine with CircuitPython. Just retested after flashing the 9.2.1 (German version). Not only does the CIRCUITPY drive show up, it also connects to my WLAN. Getting into UF2 bootloader mode is a bit tricky though and I needed a few tries. I am not sure if Thonny does the right thing. I would try manually until you see a drive with about 32MB (compared to the 1MB of the CIRCUITPY drive).

@probonopd
Copy link
Author

probonopd commented Dec 29, 2024

Wow, after erasing and then uploading the BIN version for https://circuitpython.org/board/espressif_esp32s2_devkitc_1_n4/ it is working now. I now see the CIRCUITPY drive.

Adafruit CircuitPython 9.2.1 on 2024-11-20; ESP32-S2-DevKitC-1-N4 with ESP32S2
Board ID:espressif_esp32s2_devkitc_1_n4

Thonny instantly recognizes it as

Adafruit CircuitPython 9.2.1 on 2024-11-20; ESP32-S2-DevKitC-1-N4 with ESP32S2

>>> 

now.

What I would suggest is a "S2 Mini without PSRAM" variant to be added to the download page. (This would have saved me 4 hours today.)

These boards are advertised honestly as "without PSRAM" by many sellers. So I would not call them "counterfeit", but a "low cost version".

{3B814E37-3CB7-4648-BF8A-C91968118BC6}

tannewt commented on Dec 9, 2021

I'm ok with having a board for each variant. It can make it easier to debug if the board id matches an exact board.

I understand that you don't want to call this "Lolin" or "WEMOS", but can a s2_mini_without_psram configuration please be added?

References:

@probonopd probonopd changed the title ESP32-S2 (LOLIN S2 Mini) does not show CircuitPython USB drive nor serial port ESP32-S2 (S2 Mini without PSRAM) does not show CircuitPython USB drive nor serial port Dec 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
board New board or update to a single board bug esp32-s2
Projects
None yet
Development

No branches or pull requests

3 participants