Defective ESP32S3 TFT UPLOAD/COM PORT

Please tell us which board you are using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
User avatar
RM3578
 
Posts: 11
Joined: Tue Mar 28, 2017 6:43 pm

Defective ESP32S3 TFT UPLOAD/COM PORT

Post by RM3578 »

Just received three (3) each ESP32S3 TFT. All behave the same.
Brand new out the box: Upload the initial blink sketch works fine (once).
Try to upload the sketch again, it hangs looking for a serial port after compiling.
While compiling, the Arduino IDE issues a reset to the board. The board never comes back online.
Need to press the reset button to get the board to reboot. By now the IDE reported a failure to communicate.
Windows Device Manager does not show a connected device after the reset command. The ESP32S3TFT just does not come up.

Press reset and try again - same result
To make it take a sketch, I need to:
1. Set the board on boot mode (boot/reset/release reset/release boot).
2. This results on a new COM port assigned to the board. The board is detected but has no code.
3. Change the COM port on the IDE to the boot COM port. Upload the code.
4. The code transfers to the board. The board fails to reboot.
5. Press the reboot button. The board reboots
6. The board registers back to the original COM PORT and runs the uploaded code.
7. Change the IDE back to the original COM port.
6. Upload another code, the board fails to reboot. Goes dark.
7. Return to step 1 and try your luck again.

3 brand new boards just receive directly from Adafruit (January 2023), all have the same problem.
3 ESP32S2 boards work as normally on the same computer/cables/etc.


The sketch is blink so no issues with the sketch.
Same behavior on Arduino 1.8, platformIO on VSCode, and Arduino 2.0.3 IDE
The issue is with the ESP32S3 TFT Boards that fail to do a proper reboot sequence upon code uploading.

Strangely enough. Whatever code the boards were running from the Adafruit factory allows for a clean reboot the first time I upload a sketch on each one of the three boards.



Thoughts?

User avatar
dThirteen
 
Posts: 42
Joined: Tue Aug 27, 2019 6:20 pm

Re: Defective ESP32S3 TFT UPLOAD/COM PORT

Post by dThirteen »

Sadly, this is just how they work when you use Arduino. Look through this forum and you'll see plenty of other people complaining of the same thing. I posted much the same thing yesterday.

For what it's worth, this isn't a fault in your boards. It's just how they work. Someone thought this was an acceptable user experience and signed off on it.

User avatar
RM3578
 
Posts: 11
Joined: Tue Mar 28, 2017 6:43 pm

Re: Defective ESP32S3 TFT UPLOAD/COM PORT

Post by RM3578 »

After I posted I realized there are tons of other people with the problem.

I also know that there is a solution.

The clue is that the initial loading from Adafruit (the default screen) works as it should. When you upload a code for the first time with the default Adafruit program, it will reboot properly. That tells me that Adafruit compiled the program with a working board definition, library dependencies, software version, or some other component that is somehow not working in the released libraries. Perhaps an older board definition or an old (or new unreleased) library somewhere on the dependency tree. I fully agree with you, it is a software problem and not a hardware problem.

There is a fix, if only they can figure out the differences in the dependencies from their shipping image to what is available for public use.

I was going to return them, but Adafruit has been really good in the past and it is just a matter of time before they fix it. I hope it is not too much time though :)

User avatar
Franklin97355
 
Posts: 23911
Joined: Mon Apr 21, 2008 2:33 pm

Re: Defective ESP32S3 TFT UPLOAD/COM PORT

Post by Franklin97355 »

The problem seems to be in the ESP32-S3 chip, not the Adafruit board. Have you tried another board from Espriff or others?

User avatar
RM3578
 
Posts: 11
Joined: Tue Mar 28, 2017 6:43 pm

Re: Defective ESP32S3 TFT UPLOAD/COM PORT

Post by RM3578 »

As detailed in the original post:
3 ESP32S2 boards work as normally on the same computer/cables/etc.
Again, to be clear. I believe there is a software mis-configuration somewhere on the libraries available to us on the internet, and that Adafruit has the proper libraries on their systems as the program that ships with the S3 variant works as expected. I do not expect this to be a hardware problem, but it can be an issue with Espressif libraries, Adafruit's board definition, or the Arduino libraries.

User avatar
seejordan
 
Posts: 8
Joined: Tue Jul 21, 2020 1:57 am

Re: Defective ESP32S3 TFT UPLOAD/COM PORT

Post by seejordan »

May be having a similar issue. All my feathers are dead. Hours of mac/pc install/uninstall, etc. Oddly, the Adafruit playground reads fine every time. Thinking if I can now switch my code to python and just return these Feathers.. Four new ones today, none can connect. Mac/pc, updated drivers and and and. Frustrating.

User avatar
adafruit2
 
Posts: 22148
Joined: Fri Mar 11, 2005 7:36 pm

Re: Defective ESP32S3 TFT UPLOAD/COM PORT

Post by adafruit2 »

the espressif BSP changes often, could just be a change recently caused the bootloader to not kick back to user code.

the good news is that there is no damage to hardware or 'bricking' possible by uploading code. S3 has a built in ROM bootloader so it will always work even if the BSP changes. you can *always* enter the ROM bootloader by pressing BOOT and clicking reset, then selecting the bootloader COM port in Arduino before uploading. its documented here https://learn.adafruit.com/adafruit-esp ... rduino-ide

we'll take a look this week, see if we can reproduce it. in the meantime you could also try older Espressif board support packages, check the arduino board installer for the ability to select which 'version' you want to run, an older version might work fine.

User avatar
RM3578
 
Posts: 11
Joined: Tue Mar 28, 2017 6:43 pm

Re: Defective ESP32S3 TFT UPLOAD/COM PORT

Post by RM3578 »

Thanks! I knew you guys would be on top of it. Hopefully it really is a simple issue as I think it is.
in the meantime you could also try older Espressif board support packages, check the arduino board installer for the ability to select which 'version' you want to run, an older version might work fine.
FYI. I went back and tried all the Espressif ESP32 board definitions up until the S3 no longer appears, and none of them worked. They all had the same behavior. Hope this helps.

User avatar
dThirteen
 
Posts: 42
Joined: Tue Aug 27, 2019 6:20 pm

Re: Defective ESP32S3 TFT UPLOAD/COM PORT

Post by dThirteen »

adafruit2 wrote: Sat Jan 14, 2023 7:00 pm the espressif BSP changes often, could just be a change recently caused the bootloader to not kick back to user code.

the good news is that there is no damage to hardware or 'bricking' possible by uploading code. S3 has a built in ROM bootloader so it will always work even if the BSP changes. you can *always* enter the ROM bootloader by pressing BOOT and clicking reset, then selecting the bootloader COM port in Arduino before uploading. its documented here https://learn.adafruit.com/adafruit-esp ... rduino-ide

we'll take a look this week, see if we can reproduce it. in the meantime you could also try older Espressif board support packages, check the arduino board installer for the ability to select which 'version' you want to run, an older version might work fine.
I can confirm that on Debian, with the port on "Adafruit Feather ESP32-S3 2MB PSRAM" I can upload my sketch without first activating the bootloader. I still need to press reset and reselect the "Adafruit Feather ESP32-S3 2MB PSRAM" port afterward. This with Arduino IDE 1.8.13 and Espressif esp32 2.0.6. This is repeatable.

On Windows 10 I must always first activate the bootloader and select the "ESP32S3 Dev Module" port before uploading. Otherwise same steps following upload. Same IDE and esp32 versions as on Debian. Also repeatable (and tedious). Sadly, my work requires me to use Windows so I am stuck with it.

I have a few Lilygo T-Display boards that have the ESP32-S3. They also have an onboard USB driver chip. These work as an Arduino coder would expect - press Upload and wait to see the results of your code with no further steps required. This is what I want from a part that I am not ever going to use as a mouse. :)

User avatar
seejordan
 
Posts: 8
Joined: Tue Jul 21, 2020 1:57 am

Re: Defective ESP32S3 TFT UPLOAD/COM PORT

Post by seejordan »

Tried the reset boot loader steps. Only change on Mac is I get repeated "Disk not ejected properly". Although I'm never able to see the port with the arduino on it (using command line ls /dev/cu*, nothing ever shows). Frustrating.

User avatar
adafruit2
 
Posts: 22148
Joined: Fri Mar 11, 2005 7:36 pm

Re: Defective ESP32S3 TFT UPLOAD/COM PORT

Post by adafruit2 »

see - if your feathers were *never* able to be uploaded to, its not the same issue as this one. please start a new thread since we cannot effectively debug two issues in one thread

User avatar
hathach
 
Posts: 1270
Joined: Tue Apr 23, 2013 1:02 am

Re: Defective ESP32S3 TFT UPLOAD/COM PORT

Post by hathach »

I am able to reproduce the issue on Espressif S3 devkit-C. It seems to be the S3 specific (not Adafruit) issue. At first glance, arduino-core specially disable USB-OTG on S3 and switch bootloader to jtag-cdc, therefore I have tried a few modification to enable/reset/disable etc with S3 USB-OTG when reboot to bootloader but no success. Here is the location of the file if anyone interested.
https://github.com/espressif/arduino-es ... usb.c#L481

Later on I found this issue
https://github.com/espressif/arduino-esp32/issues/6762

Notable response from the issue
by me-no-dev one of lead developer of arduino-esp32.
Surely if we could we would have :) I went through ROM code and everything, but could not figure out what is preventing the board/download mode to reboot the firmware. When booting into download from TinyUSB, we first stop TinyUSB, then init CDC+JTAG and then reboot into download, so in reality it should have been the same as rebooting from CDC+JTAG, but it is not. We might find a way in the future, but this has taken too much resources already as it is.
The reason is pointed by user egnor, which is due to one of the efuse bit of S3 is programmed to disable download in USB-OTG mode is SET by default, described in this espressif document https://www.espressif.com/sites/default ... s%20EN.pdf . Document is updated recently saying that the new patch of S3 has fixed this, so I guess there is probably no fix rather than hoping that we will have a relative recent patch of S3 ??
Screenshot from 2023-01-20 11-50-12.png
Screenshot from 2023-01-20 11-50-12.png (257.83 KiB) Viewed 299 times

User avatar
hathach
 
Posts: 1270
Joined: Tue Apr 23, 2013 1:02 am

Re: Defective ESP32S3 TFT UPLOAD/COM PORT

Post by hathach »

SUM UP of above post: AFAIK this is S3 issue, and the fix is getting the new patch of chip

I made a simple sketch to read and print out the efuse for you to test.

Code: Select all

#include "soc/efuse_reg.h"

bool dis_usb_otg_download;

void setup() {
  // put your setup code here, to run once:
  dis_usb_otg_download = REG_GET_FIELD(EFUSE_RD_REPEAT_DATA3_REG, EFUSE_DIS_USB_OTG_DOWNLOAD_MODE);
}

void loop() {
  // put your main code here, to run repeatedly:
  Serial.printf("EFUSE Disable USB-OTG Download = %u\r\n", dis_usb_otg_download);
  delay(3000);
}
My result on a few S3 board I got is

Code: Select all

EFUSE Disable USB-OTG Download = 1

User avatar
RM3578
 
Posts: 11
Joined: Tue Mar 28, 2017 6:43 pm

Re: Defective ESP32S3 TFT UPLOAD/COM PORT

Post by RM3578 »

I think this is a slightly different issue. (could be related??)

The issue I am reporting is that when you start an upload, the board resets but never gets to the bootloader. You have to put it in programming mode before arduino times out in order to upload a code, and you still have to reset the board after.

From the github code you posted:
Other Steps to Reproduce

Select USB mode = USB-OTG, USB CDC on boot = enabled, Upload mode = USB OTG CDC.
Upload sketch
Board correctly resets into download mode using 1200 baud and uploads the sketch
Board does not reset and run the sketch as it should, instead staying in download mode. Here you have to press the reset button manually. On S2 the board resets and runs the sketch after upload with no manual intervention.
I get that same behavior on a QT Py ESP32-S3 I have (November '22 purchase instead of January '23). After uploading the code I just press reset and it runs, and it is also ready for another upload. It is not a big deal (unless you try remote uploads over wifi).

I still think something changed in the chain since the November. I keep thinking that because the out-of-the-box board from Adafruit with their factory sketch does not exhibit this problem, so there is a way to program the boards without the issue. Probably an 'updated' dependency that broke the reset sequence. My 2 cents...

I could live with resetting the board after upload, but the sequence of putting it in bootloader, changing com ports, uploading, reseting, changing com ports again, etc is just unworkable for development.

User avatar
dThirteen
 
Posts: 42
Joined: Tue Aug 27, 2019 6:20 pm

Re: Defective ESP32S3 TFT UPLOAD/COM PORT

Post by dThirteen »

hathach wrote: Fri Jan 20, 2023 1:13 am My result on a few S3 board I got is

Code: Select all

EFUSE Disable USB-OTG Download = 1
I get this on my Adafruit Feather ESP32-S3 2MB PSRAM, too.
RM3578 wrote: Fri Jan 20, 2023 5:53 pm I think this is a slightly different issue. (could be related??)

The issue I am reporting is that ...

... the sequence of putting it in bootloader, changing com ports, uploading, reseting, changing com ports again, etc
Sorry to condense your post. This is the sequence I also experience. Perhaps we are interpreting things differently, but I read the Issue Summary that @hathach posted, which is due to a security advisory, as saying exactly that. That is, at rest, the board is in USB-OTG mode. Due to the fuse being set, the S3 cannot self change to bootload (CDC+JTAG) mode. That is why we must manually do all the button pressing to get the S3 into bootload mode prior to the sketch uploading.

So that is, the loading sequence we are experiencing is due to 2 issues. The first is not being able to automatically go into bootload mode to upload the sketch, and the second is not being able to reboot into the sketch after upload. The first is due to a set-one-time-only fuse, meaning our Feathers are stuck this way and we will have to live with it and hope Adafruit may replace them at some point with the later non-fuse-set ESP32-S3 parts. The second may be fixable with some code, probably an updated ROM from espressif. At least, after reading the github thread, that's my take. :)

Locked
Please be positive and constructive with your questions and comments.

Return to “Feather - Adafruit's lightweight platform”