QT Py ESP32-S3 won't boot back to Arduino

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
User avatar
Cuptapus
 
Posts: 9
Joined: Sun Aug 07, 2022 12:23 am

QT Py ESP32-S3 won't boot back to Arduino

Post by Cuptapus »

Adafruit QT Py ESP32-S3 WiFi Dev Board with STEMMA QT - 8 MB Flash / No PSRAM

I was developing a BLE application on it for a while in Arduino. After one upload after nothing major changed in the code, it started acting up and I couldn't get it to work again even after reverting to a known good build.

Figuring that I might have zapped something since the reset button is in the middle of everything, I tried switching to my second unused QT Py ESP32-S3, but that one started failing in the same way.

I figured something in my program might have overwrote something in the bootloader, so I followed the factory reset procedure detailed here (https://learn.adafruit.com/adafruit-qt- ... tory-reset). Now the board always shows up as its QTPYS3BOOT UF2 bootloader and nothing else no matter how many times I reset it.

Copying over the 'update-tinyuf2-adafruit_qtpy_esp32s3-0.10.2.uf2' file doesn't have any effect. It just flickers and shows back up as the QTPYS3BOOT.

I was able to successfully flash it with its CircuitPython build and it correctly shows up as CIRCUITPY, but when I try to program it with an Arduino sketch, it loses its COM port halfway through and errors out with this message:

"Sketch uses 291429 bytes (22%) of program storage space. Maximum is 1310720 bytes.
Global variables use 21972 bytes (6%) of dynamic memory, leaving 305708 bytes for local variables. Maximum is 327680 bytes.
Couldn't find a Board on the selected port. Check that you have the correct port selected. If it is correct, try pressing the board's reset button after initiating the upload."

At this point I'm stuck and am just wondering if I somehow just bricked both my boards.

User avatar
dastels
 
Posts: 11198
Joined: Tue Oct 20, 2015 3:22 pm

Re: QT Py ESP32-S3 won't boot back to Arduino

Post by dastels »

Cuptapus wrote:Check that you have the correct port selected. If it is correct, try pressing the board's reset button after initiating the upload.
Have you tried that?

When you're working in C++ (using Arduino in your case) you are using the bootloader to put your code into flash. Unless your code presents a USB drive (e.g. you're using the TinyUSB library) there's nothing to have it show up as a drive.

Dave

User avatar
Cuptapus
 
Posts: 9
Joined: Sun Aug 07, 2022 12:23 am

Re: QT Py ESP32-S3 won't boot back to Arduino

Post by Cuptapus »

Yup, I've tried that many times. I always verified I was using the correct port with the Device Manager open. If it's currently programmed with its CircuitPython build, it'll restart part of the way through programming, windows will give me a "USB Device Not Detected" error and it will show back up as its CircuitPython build. If it's manually flashed with its non-CircuitPython build, it just won't show up on any port at all. Pressing reset just pops it back up as whatever it was.

User avatar
dastels
 
Posts: 11198
Joined: Tue Oct 20, 2015 3:22 pm

Re: QT Py ESP32-S3 won't boot back to Arduino

Post by dastels »

Hmm. Do you have the correct board set in the Tools menu? Also, have a look at https://learn.adafruit.com/adafruit-qt- ... 63d17882fc in the product tutorial.

Dave

User avatar
Cuptapus
 
Posts: 9
Joined: Sun Aug 07, 2022 12:23 am

Re: QT Py ESP32-S3 won't boot back to Arduino

Post by Cuptapus »

Yup, I always verified that I was using the correct QT Py ESP32-S3 No PSRAM board in the Arduino IDE. I also went through that guide more than a few times and everything is set up correctly.

I'm guessing I probably did just manage to fry both boards somehow. The USB Cable I had been using has a damaged inner plastic retention bit, and though it had been working fine for the past month or so, maybe something jiggled around enough in just the wrong way to cause some sort of arcing. Still weird that both boards fried one after the other, and that CircuitPython, and manually flashing with Esptool works, but anything with Arduino doesn't.

Anyways, I really appreciate your help Dave. I think at this point, I'm just going to consider those boards fried.

Best,
Kevin

User avatar
dastels
 
Posts: 11198
Joined: Tue Oct 20, 2015 3:22 pm

Re: QT Py ESP32-S3 won't boot back to Arduino

Post by dastels »

Have you checked that the bootloader is up to date and updating it if not? See the bottom of https://circuitpython.org/board/adafrui ... 3_nopsram/.

Dave

User avatar
mjchapmn
 
Posts: 5
Joined: Wed Mar 23, 2016 2:32 pm

Re: QT Py ESP32-S3 won't boot back to Arduino

Post by mjchapmn »

I am having what seems like the exact same issue on QT PY ESP32-S2.

When I connect this board Arduino IDE does not even detect it anymore. I have several other QT PY ESP32-S2 boards (exact same) at they work just fine. Port is detected, can be selected. With the problematic board, when I try to begin the factory reset process, the port isn't even visible in Chromium.

User avatar
dastels
 
Posts: 11198
Joined: Tue Oct 20, 2015 3:22 pm

Re: QT Py ESP32-S3 won't boot back to Arduino

Post by dastels »

mjchapmn wrote:I am having what seems like the exact same issue on QT PY ESP32-S2.
Please create a new thread for your problem.

Dave

User avatar
Cuptapus
 
Posts: 9
Joined: Sun Aug 07, 2022 12:23 am

Re: QT Py ESP32-S3 won't boot back to Arduino

Post by Cuptapus »

dastels wrote:Have you checked that the bootloader is up to date and updating it if not? See the bottom of https://circuitpython.org/board/adafrui ... 3_nopsram/.

Dave
Yup, it's up to date. I followed the procedure here (https://learn.adafruit.com/adafruit-qt- ... tory-reset) to perform a factory reset and re-flash the bootloader. Checking the INFO_UFT.TXT file matches what's listed in the link you provided:

TinyUF2 Bootloader 0.10.2 - tinyusb (0.12.0-203-ga4cfd1c69)
Model: Adafruit QT Py ESP32-S3
Board-ID: ESP32S3-QTPy-A
Date: Jun 24 2022

User avatar
dastels
 
Posts: 11198
Joined: Tue Oct 20, 2015 3:22 pm

Re: QT Py ESP32-S3 won't boot back to Arduino

Post by dastels »

Any improvement?

Dave

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

Re: QT Py ESP32-S3 won't boot back to Arduino

Post by adafruit2 »

you can also try https://espressif.github.io/esptool-js/ to fully erase the flash, sometimes that helps any 'sticky' remaniders!

User avatar
Cuptapus
 
Posts: 9
Joined: Sun Aug 07, 2022 12:23 am

Re: QT Py ESP32-S3 won't boot back to Arduino

Post by Cuptapus »

dastels wrote:Any improvement?

Dave
Oh sorry, I should been more clear in my reply. I did all of those steps before I made my first post here, so no dice. I think it's just looking more and more likely that my boards are just fried.
adafruit2 wrote:you can also try https://espressif.github.io/esptool-js/ to fully erase the flash, sometimes that helps any 'sticky' remaniders!
I followed that when I was originally trying to re-flash the MCU.

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

Re: QT Py ESP32-S3 won't boot back to Arduino

Post by adafruit2 »

ok so when you do the factory reset, you *can* get into the bootloader. and the neopixel does the rainbow swirl when its not in the bootloader? cause if you are in the bootloader the board is def not fried. what version of the ESP board support package & Arduino IDE are you running?

User avatar
Cuptapus
 
Posts: 9
Joined: Sun Aug 07, 2022 12:23 am

Re: QT Py ESP32-S3 won't boot back to Arduino

Post by Cuptapus »

To answer your first questions, when I perform the factory reset and re-flash "qt-py-esp32-s3-factory-reset-and-bootloader.bin", I can only get into the bootloader. I never get the rainbow swirl. If I try to copy over the "update-tinyuf2-adafruit_qtpy_esp32s3-0.10.2.uf2" file to QTPYS3BOOT, it seems to copy over fine, the board resets, and the bootloader shows up again.

The esp32 board support package I'm using (as found in the Boards Manager) is 2.0.4. The version of Arduino I'm using is 1.8.19 (Windows Store 1.8.57.0).

Just to add a bit more data into the mix, I went back and re-erased and re-flashed the .bin file and recorded the outputs:

(first note is that the QT Py guide still calls out the deprecated flasher tool which adds a small but fairly easily resolved amount of confusion)

I started with the https://espressif.github.io/esptool-js/ tool, and I was able to connect and erase the flash, but programming it with the web-based tool errors out as follows:

esptool.js v0.1-dev
Serial port WebSerial VendorID 0x303a ProductID 0x1001
Connecting....
Detecting chip type... ESP32-S3
Chip is ESP32-S3
Features: Wi-Fi,BLE
Crystal is 40MHz
MAC: f4:12:fa:44:12:54
Uploading stub...
Running stub...
Stub running...
Changing baudrate to 921600
Changed
Erasing flash (this may take a while)...
Chip erase completed successfully in 2.258s
Compressed 4420676 bytes to 124923...
Writing at 0x0... (12%)
Writing at 0x4000... (25%)
Writing at 0x8000... (37%)
Error: Timeout

I then switched back to the command line esptool.py and successfully flashed "qt-py-esp32-s3-factory-reset-and-bootloader.bin" with the following output:

C:\Users\Moirai>esptool.py --port COM6 write_flash 0x0 qt-py-esp32-s3-factory-reset-and-bootloader.bin
esptool.py v4.2
Serial port COM6
Connecting...
Detecting chip type... ESP32-S3
Chip is ESP32-S3
Features: WiFi, BLE
Crystal is 40MHz
MAC: f4:12:fa:44:12:54
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Flash will be erased from 0x00000000 to 0x00437fff...
Compressed 4420672 bytes to 124921...
Wrote 4420672 bytes (124921 compressed) at 0x00000000 in 19.8 seconds (effective 1784.4 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...

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

Re: QT Py ESP32-S3 won't boot back to Arduino

Post by adafruit2 »

ok hmm can you do me a favor and take a photo of the S3 chip on the back of the QT py so i can see the markings?

Post Reply
Please be positive and constructive with your questions and comments.

Return to “Arduino”