ESP32S2 mini doesn't produce port after I upload my sketch

Continuing the discussion from Upload to ESP32-S2 board fails: "WARNING: ESP32-S2FNR2 (revision v0.0) chip was placed into download mode using GPIO0.":

Hi There
I've been all over tinternet trying to find a solution to this very problem without success. My experience is the same as described above in this thread. I put my ESP32S2 mini into download mode, successfully compile and download a sketch. I see the warning message at the end of the download as many others have reported. When I restart the board either by pressing the RST button on the board or by removing and reinserting the USB connector from my PC then NOTHING HAPPENS.
What I expect is to hear is the Windows 'chime' you get when inserting a new device and to see the device on a port either using Windows device manager or inside the Arduino IDE / Tools /Port. Windows (10) sees the board if it is restarted in download mode by first pressing the GPIO 0 button). I have tried 4 different boards (one of which I am sure has been successfully used a good while ago) and always get the same result. One point of note - the very first time a brand new board is inserted (ie not in download mode but containing whatever comes loaded on the board) it IS recognised by Windows, but as a user I put the chip into download , put my sketch on and always end up 'locked out' . Please help !!

Hi @mtaylo12.

A fairly unique thing about the boards that use the microcontrollers of the ESP32 family with native USB capability (as is the case with your board) is that they are typically configured to disable the use of their USB CDC serial port in the sketch by default.

That default disabled configuration is appropriate when your sketch doesn't use the serial port, but in cases where you do need it (such as when your sketch calls Serial.println, etc.), then it is necessary to configure the board so that the port will be enabled. Fortunately this is quite easy since the ESP32 boards platform developers configured the board definition to produce a custom board options menu you can use to enable or disable the port as needed via the Arduino IDE user interface.

Please try this:

  1. Select Tools > USB CDC On Boot > Enabled from the Arduino IDE menus.
  2. Upload the sketch to your board again, just as you did before.
  3. Wait for the upload to finish with the "Hash of data verified." message that indicates the upload was successful.
  4. Press and release the reset button on your board.

Now check to see if the board is producing a serial port as expected.

Thank you so much for your prompt reply. This has allowed me to move forwards with my project and was the issue that was causing me so much trouble. Seeing also how others have struggled with this I'm sure that your clear response will have wider value.
A further note to help others - if you (like me) tried changing the board definition (in my case form ESP32S2 Dev Module to LOLIN S2 mini) - the USB CDC boot setting is board specific - so if you change the board you have selected you may also have to change the USB CDC boot setting 'again'. Also this setting is only visible for some boards - so if you've selected a board that's completely wrong you wont even see it as an option to change - beware!
Thanks again.....

I am experiencing the same issue as described; however, I had the recommended setting Tools > USB CDC On Boot > Enabled already applied. After a successful compile and upload, I hit RST and my device disconnects from my PC.

As a side note, I am using the universal Windows USB driver.

Oh no!
After the success (see my last post) when i was using a Windows PC, I have now switched to using a Notebook running Linux. I have tried using both the V1.8.19 and also V2.3.2 and whilst using the same board have noted the following:
When the board 'ESP32S2 Native USB' (the board I think I should be using) is selected in the IDE, the option under the Tools menu to change the CDC parameter is NOT offered. If however I change the board to 'ESP32S2 Dev module' then the CDC option is offered and can be changed.
Irrespective of the board I choose within the IDE however, I can successfully compile and load the sketch, but after that and restarting it, the board will not connect to the OS as evidenced by checking via the dmesg command.
Other possibly helpful info:
If I use the 'Get Board Info' option in Tools it returns BN: ESP32S2 Dev Module
also the warning message after downloading the compiled sketch reads....."Warning ESP32-S2FH4 (revision v0.0) chip was placed into download mode using GPIO0........"
Any more help would be gratefully received

Just use the 'ESP32S2 Dev module' board selection. The 'ESP32S2 Native USB' board definition was added for a specific use case of ESP32-S2-based boards. The 'ESP32S2 Dev module' is a general purpose board definition that allows for any possible configuration of ESP32-S2 based boards so the 'ESP32S2 Dev module' board definition is more appropriate for your situation. You don't lose anything by using the 'ESP32S2 Dev module' board definition instead of 'ESP32S2 Native USB'.

@mtaylo12 I am having the exact same problem after uploading any sketches.

This would be fine, but I need to use the Serial Monitor for troubleshooting, and every time I press "RST", the board disconnects and the Serial Monitor never shows the "reset messages".

Have you come across any solutions to being able to use the Serial Monitor with these boards?

I have three: ESP32-S2FNR2 (revision v1.0)

Thanks!

Hi @skyscream111.

The ESP32-S2 based boards have a unique characteristic, which is that they don't produce a serial port after a reset or power cycle if you had "Disabled" selected from Arduino IDE's Tools > USB CDC On Boot menu at the time the sketch was uploaded.

When the board is in this state, it will produce a serial port after you put the board into the special boot mode, after which you can upload a new sketch.

I'll provide instructions you can follow to do that:

  1. Press and hold the "Boot" button on the board.
  2. Press and release the reset button on the board.
  3. Release the "Boot" button on the board.
  4. Select the port of your board from the Tools > Port menu in Arduino IDE.
  5. Start an upload in Arduino IDE.
  6. Wait for the upload to finish.
  7. Press and release the reset button on the board.

The upload should now finish successfully.

if you had "Disabled" selected from Arduino IDE's Tools > USB CDC On Boot menu, you will find that the board will no longer produce a serial port after it is reset or power cycled just like before. If your sketch doesn't make any use of the serial port then this is no problem as you will only need the port when uploading and you now know the technique for doing that. If your sketch does use the serial port, then select Tools > USB CDC On Boot > Enabled from the Arduino IDE menus and then upload a sketch (following the procedure described above). After that, the board will produce a serial port even when the sketch is running.