0

Another QT Py not responding
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Another QT Py not responding

by d_w_a on Mon Apr 12, 2021 7:42 pm

Hi,

I've just received QT Py and it seems that it has the same problem as some already encountered. No LED flashing after connecting USB, nothing happens after pressing rst button twice. I'm not sure if others reported that QT Py, but my board is not detected on Windows PC when connecting USB (My other boards with USB type-c work ok, with the same PC and cable). Problem is that I ordered from Mouser and I'm located in the Canary Islands. What should I do?

d_w_a
 
Posts: 2
Joined: Sun Feb 25, 2018 7:52 pm

Re: Another QT Py not responding

by mikeysklar on Tue Apr 13, 2021 5:50 pm

Yeah, this is a difficult situation based on your location. We have had people re-flash their boards using another M0/M4 based controller which you might want to try before going into the return process.

https://learn.adafruit.com/programming- ... an-arduino

viewtopic.php?f=19&t=176829&p=862324&hilit=qtpy+flash#p862324

Thanks again for all the pointers! Once you figure it out it's not difficult anymore. Here's the procedure of what ended up working with the restriction of only having another M0 available to do the unbricking; in my case a Seeeduino Xiao, but it'd of course be very similar with another, working, QTPy:

Install the Seeeduino Xiao stuff into the Arduino IDE's Board Manager and select both board and port (in my case, `/dev/ttyACM0` didn't have proper permissions, so take heed...
Via the Library Manager, install "Adafruit_TinyUSB_Arduino" including necessary dependencies
Download the Seed_Arduino_DAPLink library and manually install it into the Arduino IDE as well
Under Tools > USB Stack, choose "TinyUSB" instead of "Arduino"
Connect the Xiao and the QTPy like so: Xiao GND => QTPy GND, Xiao 3V3 => QTPy 3V3, Xiao D8 => QTPy Reset ("R" on the belly), Xiao D9 => QTPy SWDIO ("D"), Xiao D10 => QTPy SWCLK ("C")
Open a terminal and first `cd ~/.arduino15/packages/arduino/tools/openocd/*-arduino*/bin`, then run OpenOCD: `./openocd -f interface/cmsis-dap.cfg -f target/at91samdXX.cfg`
Open another terminal and first `cd ~/.arduino15/packages/Seeeduino/tools/arm-none-eabi-gcc/*/bin`, then run gdb: `./arm-none-eabi-gdb`
Inside the gdb shell, connect to the Port opened by OpenOCD: `target remote localhost:3333`
Download the UF2 bootloader code, unzip and cd into, then run `make BOARD=QTPy_m0` (you'll have to have some prerequisites installed; under Arch-based distros it should basically be `pacman -Sy arm-none-eabi-gcc automake nodejs`. After you get it to build without errors, note down the path to where you unzipped uf2-samdx1...
Back in the gdb shell, run: `file /path/to/uf2-samdx-1/build/QTPy_m0/bootloader-QTPy_m0-v3.13.0.elf` (answer yes when it asks whether you'd like to replace the currently running code) and then finally flash the bootloader by running `load` (it'll take a few seconds).
If everything went well, pushing the reset button should now get you some light out of that LED!

mikeysklar
 
Posts: 4609
Joined: Mon Aug 01, 2016 8:10 pm

Re: Another QT Py not responding

by d_w_a on Tue Apr 13, 2021 9:02 pm

Thanks for the answer, I should have XIAO in a few days, we'll see how it goes.

d_w_a
 
Posts: 2
Joined: Sun Feb 25, 2018 7:52 pm

Please be positive and constructive with your questions and comments.