Serious problem with QTPy SAMD21

CircuitPython on hardware including Adafruit's boards, and CircuitPython libraries using Blinka on host computers.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
ADFG_Ric
 
Posts: 3
Joined: Thu May 25, 2023 6:37 pm

Serious problem with QTPy SAMD21

Post by ADFG_Ric »

Using Linux on a Dell laptop, today, I have killed two QTPy SAMD21 (Adafruit 4800) boards by performing the following:

1. copy adafruit-circuitpython-qtpy_m0-en_US-8.1.0.uf2 to the board

2. in Thonny, in the REPL window, type the following lines:

import board
import busio
uart = busio.UART(board.TX, board.RX, baudrate=4800, bits=7, parity=EVEN, stop=2, timeout=0.5)

At this point the REPL window went into an endless loop, declaring that it could no longer connect to /dev/ttyACM0. To stop the loop I unplugged the USB cable. I would supply the text of the actual error message but I am not willing to sacrifice another board.

When plugged into the USB port, neither of the two dead boards appear as /dev/ttyACM0 and, in fact, can no longer be seen byway of the lsusb command.

The three lines of code, above, was based on the example posted, here:

https://learn.adafruit.com/adafruit-qt- ... art-serial

I cannot say if this was caused by Thonny or some problem with the QTPy UART but it appears to be fatal. Also,
this happened with nothing connected to the QTPy TX or RX pins.

Any pointers to avoid future "surprises" will be greatly appreciated.

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

Re: Serious problem with QTPy SAMD21

Post by Franklin97355 »

I don't think it is unrecoverable but I'll check since I'm not sure.

User avatar
danhalbert
 
Posts: 4687
Joined: Tue Aug 08, 2017 12:37 pm

Re: Serious problem with QTPy SAMD21

Post by danhalbert »

This appears to be Thonny-specific. I see a crash like what you've seen, but the board eventually recovers.

1. Could you stop Thonny, and then connect to the board with a terminal program like pico? When I try that, I see a simple error, that `EVEN` is not defined (you'd need busio.uart.Parity.EVEN).

2. If you double-click the reset button, do you see QTPY_BOOT?

Some of these boards went out with unprotected bootloaders, but normally that would not cause the board to be bricked in this case (it has more to do with power-cycling). See https://learn.adafruit.com/adafruit-qt- ... bootloader

User avatar
ADFG_Ric
 
Posts: 3
Joined: Thu May 25, 2023 6:37 pm

Re: Serious problem with QTPy SAMD21

Post by ADFG_Ric »

Thank you for the prompt responses.

As neither of the boards can be detected by a USB bus scan, I have no hope of "talking" to them, again. And, as time is a valuable commodity, I am only willing to spend a certain amount of it trying to revive these boards.

I did want to report this, as others may encounter the issue.

As for myself, I will be returning to a text editor and rshell ... just in case.

Again, thank you for the consideration and replies.

User avatar
danhalbert
 
Posts: 4687
Joined: Tue Aug 08, 2017 12:37 pm

Re: Serious problem with QTPy SAMD21

Post by danhalbert »

Thanks for your reply. It would be useful to know if they are really bricked. Could you just try the double-click and see if QTPY_BOOT shows up?

You are eligible for replacements if they are bricked due to the bootloader not being updated. Any replacements (and still-not-used boards) should have their bootloaders updated, as described at the link above.

User avatar
ADFG_Ric
 
Posts: 3
Joined: Thu May 25, 2023 6:37 pm

Re: Serious problem with QTPy SAMD21

Post by ADFG_Ric »

I have tried, multiple times, to revive them ... letting them "rest", plugging them back in, double clicking ... trying to detect any presence on the USB port ... no go.

On a brighter note, I checked my other SAMD21 QTPys, and they needed the bootloader upgrade. Did that. Loaded CP 8.1.0, connected byway of the Linux screen command, typed in

import board
import busio
uart = busio.UART(board.TX, board.RX, baudrate=4800, bits=7, parity=busio.UART.Parity.EVEN, stop=2, timeout=0.5)

and proceeded to read from "uart" just as I had expected to, initially. On that front, all is well.

As far as replacements go - these boards were purchased from DigiKey, not directly from Adafruit. Not sure how all of that works but I will not worry over it, too much. I use many, many Adafruit boards for various data collection and miscellaneous interfacing tasks - an issue with a couple of QTPys, under dubious (old bootloader, Thonny) circumstances, is not going to cause me any loss of sleep.

Again, thank you for your concern and assistance.

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

Return to “Adafruit CircuitPython”