Due to high demand expect some shipping delays at this time, orders may not ship for 1-2 business days.
0

QT Py RP2040 forgets CircuitPython
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

QT Py RP2040 forgets CircuitPython

by blakebr on Tue Apr 27, 2021 1:21 pm

Hello,

My QT Py 'forgets' CircuitPython 6.2.0 and/or 7.0.0 if I remove power for more than a few seconds. When I then reload CP 6.2.0 or 7.0.0, after the Boot Button process, everything works fine until the next time I have to remove power. I have tried flash_nuke.uf2, and no change. Different USB ports and different cables, no change. When I do the Boot Button process I see the standard INDEX.HTM and INFO_UF2.TXT. I then copy CircuitPython 6 or 7 to the QT Py and away we go. The reset button by itself does not bring back CircuitPython. The only components external to the QT Py RP2040 is a 1k Ohm resistor and an LED on the TX pin. Removing them does not change things. This has me stumped. Thanks for your help.

Bruce

blakebr
 
Posts: 18
Joined: Tue Apr 17, 2012 6:23 pm

Re: QT Py RP2040 forgets CircuitPython

by kattni on Tue Apr 27, 2021 4:26 pm

Hello,

To be clear, when you go through the boot select/reset button sequence, you see the RPI-RP2 drive, correct? Then, after you copy the adafruit-circuitpython-adafruit_qtpy_rp2040-en_US-6.2.0.uf2 (or 7.0.0) file to the RPI-RP2 drive, you see a CIRCUITPY drive?

Then you remove power or a period of time, and what happens when you plug it back in?

kattni
 
Posts: 101
Joined: Fri Aug 18, 2017 6:33 pm

Re: QT Py RP2040 forgets CircuitPython

by blakebr on Tue Apr 27, 2021 5:35 pm

Kattni,

Yes, With Boot pressed I see the 'RPI-RP2' drive, after I copy 6.2.0 or 7.0.0 I see the 'CIRCUITPY' drive.
When I remove power for a minute or so and reconnect, 'Nothing' happens. Silence, crickets...
On my Windows 10 machine a USB port is not triggered that there is anything on the port. 'Control Panel >> Device Manager >> Ports (COM & LPT)' Does not show the device.
After loading 'adafruit-circuitpython-adafruit_qtpy_rp2040-en_US-6.2.0.uf2' it shows up as COM16.

If I copy the exact same 'code.py' to an ItsyBitsy RP2040 the problem does not appear.
The ItsyBitsy has 'adafruit-circuitpython-adafruit_itsybitsy_rp2040-en_US-6.2.0.uf2' loaded. The Red LED pin is changed from TX on the QT Py to D13 on the ItsyBitsy.

Do I get a Black Star and get sent to sit in the corner for breaking the QT Py? ;-) Thanks for your help.

Bruce

blakebr
 
Posts: 18
Joined: Tue Apr 17, 2012 6:23 pm

Re: QT Py RP2040 forgets CircuitPython

by blakebr on Tue Apr 27, 2021 7:07 pm

Kattni,

If you have the time there is an issue with the NeoPixel RGB sequence.
neopixel.RGB gives different results if you are referencing board.NEOPIXEL or board.EXTERNAL_PIN
board.NEOPIXEL has the first two colors reversed. To get an RGB result for board.NEOPIXEL I must specify GRB.
If I specify NUM_PIXELS as '1' I reference the onboard NeoPixel, otherwise the NeoPixel string on the board..SDA pin.
I have not tested this on other versions of CircuitPython.

if(NUM_PIXELS == 1): # NEOPIXEL Internal NeoPixel
STRING = board.NEOPIXEL #
ORDER = neopixel.GRB # Neo_1=Green, Neo_2=Red, Neo_3=Blue R&G reversed
BRIGHTNESS = 0.10 #
Neo_1_Max = 150 # Green
Neo_2_Max = 50 # Red
Neo_3_Max = 250 # Blue
else: # SDA External NeoPixel(s)
STRING = board.SDA #
ORDER = neopixel.RGB # Neo_1=Red, Neo_2=Green, Neo_3=Blue R&G normal
BRIGHTNESS = 0.25 #
Neo_1_Max = 250 # Red
Neo_2_Max = 250 # Green
Neo_3_Max = 250 # Blue

Bruce

blakebr
 
Posts: 18
Joined: Tue Apr 17, 2012 6:23 pm

Re: QT Py RP2040 forgets CircuitPython

by kattni on Wed Apr 28, 2021 10:13 am

Only Adafruit stars here. :)

(Regarding the NeoPixel thing, please create a new forum post. Best to keep these single-topic.)

I have couple of questions.

Are the files in CIRCUITPY gone after the reload of the UF2, or are they still there?

Please complete the following process to eliminate a possible issue with the filesystem contents.

What I would like you to do is WITHOUT unplugging it at any point during the initial part of this process: get CircuitPython loaded. Then please connect to the serial console and enter the REPL. (https://learn.adafruit.com/welcome-to-c ... al-console is available if you don't know this process.)

Once at the >>> REPL prompt, run the following commands:
Code: Select all | TOGGLE FULL SIZE
import storage
storage.erase_filesystem()

CIRCUITPY will eject, and then remount.

Now, unplug it for the requisite amount of time, and plug it back in. Does it still fail to come back up?

~Kattni

kattni
 
Posts: 101
Joined: Fri Aug 18, 2017 6:33 pm

Re: QT Py RP2040 forgets CircuitPython

by blakebr on Wed Apr 28, 2021 12:18 pm

Kattni,

The files are NOT gone after I reload the .uf2. Everything is still there.

I followed your directions to erase the file system.
When it came back up the LED was flashing GREEN.
When I unplug, wait, plug it back in - Nothing happens.
Boot Button and reload CircuitPython, Reboot happens, All my code is gone, Factory fresh files.
code.py has 'Hello' World code in it.
Reload the lib subdirectory and add my code.py file and my code runs fine.

I noticed this morning that the issue also happens when I push the reset button.

Bruce

blakebr
 
Posts: 18
Joined: Tue Apr 17, 2012 6:23 pm

Re: QT Py RP2040 forgets CircuitPython

by kattni on Wed Apr 28, 2021 12:27 pm

This is incredibly odd. Do you have another machine, a Mac or a Raspberry Pi for example, that you could try the board on?

kattni
 
Posts: 101
Joined: Fri Aug 18, 2017 6:33 pm

Re: QT Py RP2040 forgets CircuitPython

by blakebr on Wed Apr 28, 2021 1:46 pm

Kattni,

100% failure in:
Apple charger, Samsung charger, Qualcomm 3.0 quick charger, HP printer, Dell printer, Raspberry Pi 3B+, Raspberry Pi 4B, 2 ports on first Windows 10 machine, 3 ports on second Windows 10 machine, TP-Link HS100v2.

Bruce

blakebr
 
Posts: 18
Joined: Tue Apr 17, 2012 6:23 pm

Re: QT Py RP2040 forgets CircuitPython

by kattni on Wed Apr 28, 2021 1:49 pm

Thank you for troubleshooting with me. Please email support@adafruit.com with a link to this thread, and let them know I've approved a replacement QT Py RP2040 for you. They'll take it from here.

Best guess it's something wonky with the flash, but it still isn't acting entirely like that's the case either. You found an odd one!

~Kattni

kattni
 
Posts: 101
Joined: Fri Aug 18, 2017 6:33 pm

Re: QT Py RP2040 forgets CircuitPython

by blakebr on Wed Apr 28, 2021 2:06 pm

Kattni,

I am good at finding wonky/odd things. I carry that title with a badge of pride.

Thank you very much for all your time, skills, and knowledge.

Bruce

I've got a joke about Schrodinger's Cat...
Oh wait, no I haven't...
Yes I have!

No I haven't...

(This only becomes a joke when people laugh at it.)
- - - Jay Handley

blakebr
 
Posts: 18
Joined: Tue Apr 17, 2012 6:23 pm

Please be positive and constructive with your questions and comments.


cron