Defective ESP32S3 TFT UPLOAD/COM PORT
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- RM3578
- Posts: 16
- Joined: Tue Mar 28, 2017 6:43 pm
Re: Defective ESP32S3 TFT UPLOAD/COM PORT
I think I understand but I will dive over the stuff you provided over the weekend.
I am still hopeful that this is a dependency issue given the shipping sketch from adafruit works without the issue, which I cannot explain why their code would work fine and ours would not, unless they had a different combination of board dependencies that they used to build the default image on the units. Most likely adafruit programmed the shipped program months ago with board dependencies that worked and they got "upgraded" since then...
Here is to hoping...
I am still hopeful that this is a dependency issue given the shipping sketch from adafruit works without the issue, which I cannot explain why their code would work fine and ours would not, unless they had a different combination of board dependencies that they used to build the default image on the units. Most likely adafruit programmed the shipped program months ago with board dependencies that worked and they got "upgraded" since then...
Here is to hoping...
- mbigos
- Posts: 7
- Joined: Wed Jan 04, 2023 11:17 pm
Re: Defective ESP32S3 TFT UPLOAD/COM PORT
On the QT QY ESP32 S3 when using Arduino IDE and downloading alot. I go to tools usb mode and switch to Hardware CDC and Jtag. This allows you to download as much as you want without pressing a button and it also restarts the board after downloading. The Com port stays connected as well and you don't need to select it again.
- RM3578
- Posts: 16
- Joined: Tue Mar 28, 2017 6:43 pm
Re: Defective ESP32S3 TFT UPLOAD/COM PORT
Sadly it did not work for me...switch to Hardware CDC and Jtag. This allows you to download as much as you want without pressing a button and it also restarts the board after downloading
Back to the TFT version, hopefully Adafruit will figure out what is wrong with it.
- dThirteen
- Posts: 44
- Joined: Tue Aug 27, 2019 6:20 pm
Re: Defective ESP32S3 TFT UPLOAD/COM PORT
Nor me.RM3578 wrote: Mon Jan 30, 2023 10:54 amSadly it did not work for me...switch to Hardware CDC and Jtag. This allows you to download as much as you want without pressing a button and it also restarts the board after downloading
I'm hoping they might actually acknowledge the issue as a start to figuring out how to move forward.Back to the TFT version, hopefully Adafruit will figure out what is wrong with it.
- RM3578
- Posts: 16
- Joined: Tue Mar 28, 2017 6:43 pm
Re: Defective ESP32S3 TFT UPLOAD/COM PORT
Same here. I know their codebase on the shipping image does not have the problem. That is probably the key if they have records of how they compiled it...I'm hoping they might actually acknowledge the issue as a start to figuring out how to move forward.
- hathach
- Posts: 1281
- Joined: Tue Apr 23, 2013 1:02 am
Re: Defective ESP32S3 TFT UPLOAD/COM PORT
hmm, that is strange that original firmware works. I will try to look closer at this direction
- adafruit2
- Posts: 22803
- Joined: Fri Mar 11, 2005 7:36 pm
Re: Defective ESP32S3 TFT UPLOAD/COM PORT
we're still investigating this - it definitely *used* to work, but we're not sure what changed
- hamish
- Posts: 30
- Joined: Mon Jul 20, 2015 6:46 am
Re: Defective ESP32S3 TFT UPLOAD/COM PORT
The option of a non-UF2 bootloader for Arduino/C++ users could be a nice solution?
- adafruit2
- Posts: 22803
- Joined: Fri Mar 11, 2005 7:36 pm
Re: Defective ESP32S3 TFT UPLOAD/COM PORT
if you use Arduino ESP BSP 2.0.5 the issue is somewhat resolved, the board enters the bootloader automatically on upload and the firmware uploads successfully. you may need to click reset to launch the new firmware, but there's no menu selection required
the bug was introduced in 2.0.6 in the ESP IDF and we will contact espressif to fix it
the bug was introduced in 2.0.6 in the ESP IDF and we will contact espressif to fix it
- hamish
- Posts: 30
- Joined: Mon Jul 20, 2015 6:46 am
Re: Defective ESP32S3 TFT UPLOAD/COM PORT
Tnx, is there an issue on esp-idf we can track?adafruit2 wrote: Thu Feb 09, 2023 9:18 pm the bug was introduced in 2.0.6 in the ESP IDF and we will contact espressif to fix it
- hathach
- Posts: 1281
- Joined: Tue Apr 23, 2013 1:02 am
Re: Defective ESP32S3 TFT UPLOAD/COM PORT
I have finally tracked down the issue after doing quite a bit of commits jump and bisecting. And have submit an PR to fix this to espressif arduino core
https://github.com/espressif/arduino-esp32/pull/7828
Hopefully they would review/merge and include it in upcoming release 2.0.7. It is only a couple of line of codes. If needed you could apply the fix manually (or checkout to our pr branch) to work while waiting. Thank you for reporting the issue.
Note: manual reset post upload is still required since it is part of S3 Errata. which will be fixed in the future patch of S3 chips.
https://github.com/espressif/arduino-esp32/pull/7828
Hopefully they would review/merge and include it in upcoming release 2.0.7. It is only a couple of line of codes. If needed you could apply the fix manually (or checkout to our pr branch) to work while waiting. Thank you for reporting the issue.
Note: manual reset post upload is still required since it is part of S3 Errata. which will be fixed in the future patch of S3 chips.
- jdriscoll
- Posts: 21
- Joined: Mon Oct 16, 2017 3:12 pm
Re: Defective ESP32S3 TFT UPLOAD/COM PORT
Awesome work!
- RM3578
- Posts: 16
- Joined: Tue Mar 28, 2017 6:43 pm
Re: Defective ESP32S3 TFT UPLOAD/COM PORT
I had faith in you and you came through!! Good job. Will try this in the morning and report back. Thank you for not giving up.
- hathach
- Posts: 1281
- Joined: Tue Apr 23, 2013 1:02 am
Re: Defective ESP32S3 TFT UPLOAD/COM PORT
If possible please post your testing result in the github issue as well. That would hopefully inform espressif your interest in this issue
- RM3578
- Posts: 16
- Joined: Tue Mar 28, 2017 6:43 pm
Re: Defective ESP32S3 TFT UPLOAD/COM PORT
IT WORKS!! THANK YOU !!
I updated the esp32-hal-tinyusb.c as suggested and it works on both Arduino IDE and platformIO.
For those trying to apply the same fix until the next version includes the fix (hopefully 2.0.7), here is what I did:
Updated both the Arduino and the platformIO file. You can find them at:
"C:\Users\thisIsMyUserName\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.6\cores\esp32\esp32-hal-tinyusb.c"
"C:\Users\thisIsMyUserName\.platformio\packages\framework-arduinoespressif32\cores\esp32\esp32-hal-tinyusb.c"
(of course, replace "thisIsMyUserName" with your user name).
Add the lines as instructed on https://github.com/espressif/arduino-es ... 7828/files
- Line 43 add #include "hal/usb_phy_ll.h", new line 419 add "usb_phy_ll_int_jtag_enable(&USB_SERIAL_JTAG);"
Do this on both files. See the github pull request for more information.
Create a simple sketch. I was unable to upload code on the platformIO IDE so I did the Arduino IDE first.
This should work until the next version of ESP32. If the pull request gets implemented on the next version the universe will be ok. If they do not approve the pull request I suspect the file will be overwritten and will have to be manually changed again, so return to this instructions to set the universe right again.
Huge thanks to @hathach for finding the needle in the haystack. I bet this was not an easy find, and we really appreciate your efforts.
I updated the esp32-hal-tinyusb.c as suggested and it works on both Arduino IDE and platformIO.
For those trying to apply the same fix until the next version includes the fix (hopefully 2.0.7), here is what I did:
Updated both the Arduino and the platformIO file. You can find them at:
"C:\Users\thisIsMyUserName\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.6\cores\esp32\esp32-hal-tinyusb.c"
"C:\Users\thisIsMyUserName\.platformio\packages\framework-arduinoespressif32\cores\esp32\esp32-hal-tinyusb.c"
(of course, replace "thisIsMyUserName" with your user name).
Add the lines as instructed on https://github.com/espressif/arduino-es ... 7828/files
- Line 43 add #include "hal/usb_phy_ll.h", new line 419 add "usb_phy_ll_int_jtag_enable(&USB_SERIAL_JTAG);"
Do this on both files. See the github pull request for more information.
Create a simple sketch. I was unable to upload code on the platformIO IDE so I did the Arduino IDE first.
Once you upload the sketch the S3 board will be working as normal (you still have to manually reset after the upload). You will have the normal capabilities except that after every upload you need to press "reset" (known bug in the ESP and a different issue).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.
This should work until the next version of ESP32. If the pull request gets implemented on the next version the universe will be ok. If they do not approve the pull request I suspect the file will be overwritten and will have to be manually changed again, so return to this instructions to set the universe right again.
Huge thanks to @hathach for finding the needle in the haystack. I bet this was not an easy find, and we really appreciate your efforts.
Please be positive and constructive with your questions and comments.