KB2040 will not work after power cycle

For Adafruit customers who seek help with microcontrollers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
slammers
 
Posts: 5
Joined: Wed Dec 21, 2022 2:21 pm

KB2040 will not work after power cycle

Post by slammers »

I purchsed 5 KB2040 for a project and one of them is acting odd. I am programming using the C/C++ SDK. When I put the device into boot mode and copy over the program, it works just find. But after power cycling it appears dead.

If I then put it back into boot mode and copy over the UF2 file again, it works fine.

I tried this with a very siumple blink program and it has the same symptoms.

Does anyone know why it would not function from a cold boot? Does it have defective flash?

User avatar
adafruit_support_carter
 
Posts: 29150
Joined: Tue Nov 29, 2016 2:45 pm

Re: KB2040 will not work after power cycle

Post by adafruit_support_carter »

Is the behavior unique to using the C/C++ SDK? Do you see similar behavior using Arduino?

User avatar
slammers
 
Posts: 5
Joined: Wed Dec 21, 2022 2:21 pm

Re: KB2040 will not work after power cycle

Post by slammers »

I have never tried arduino.

I can try the Python interpreter I guess. Or is that what you mean?

User avatar
adafruit_support_carter
 
Posts: 29150
Joined: Tue Nov 29, 2016 2:45 pm

Re: KB2040 will not work after power cycle

Post by adafruit_support_carter »

Yep, or CircuitPython. Idea is to just test with something else to help determine if it's something specific to the C/C++ SDK usage or elsewhere.

User avatar
slammers
 
Posts: 5
Joined: Wed Dec 21, 2022 2:21 pm

Re: KB2040 will not work after power cycle

Post by slammers »

Micropython has the same result.

I program it and Thonny connects just fine and I can run code and save to flash.

Press the reset button and Thonny will not longer connect

Power cycle, Thonny will not connect

Re-install Python, Thonny connects

I can then load the code that I had saved to the Pico with thonny and run it.

Press reset button and its dead again.

User avatar
adafruit_support_carter
 
Posts: 29150
Joined: Tue Nov 29, 2016 2:45 pm

Re: KB2040 will not work after power cycle

Post by adafruit_support_carter »

Weird. And that behavior is specific to only 1 out of 5 total KB2040's?

User avatar
slammers
 
Posts: 5
Joined: Wed Dec 21, 2022 2:21 pm

Re: KB2040 will not work after power cycle

Post by slammers »

Yes, only one has this problem.

User avatar
adafruit_support_carter
 
Posts: 29150
Joined: Tue Nov 29, 2016 2:45 pm

Re: KB2040 will not work after power cycle

Post by adafruit_support_carter »

OK, try this blink test UF2. Put the KB2040 in bootloader mode and drag the UF2 to the RPI-RP2 folder. It should blink the onboard NeoPixel.

Is it still doing the same thing?
KB2040_NEO_BLINK.UF2
(131.5 KiB) Downloaded 5 times

User avatar
slammers
 
Posts: 5
Joined: Wed Dec 21, 2022 2:21 pm

Re: KB2040 will not work after power cycle

Post by slammers »

Ok so that is odd. That program survives a reset.

So I re-installed my blink program that does basically the same thing and it does not survive a reset.

I installed the micro python interpreter, it also again does not survive a reset.

Re-installing the Adafuit blinky program, it does survive a reset.

What could be the difference?

User avatar
adafruit_support_carter
 
Posts: 29150
Joined: Tue Nov 29, 2016 2:45 pm

Re: KB2040 will not work after power cycle

Post by adafruit_support_carter »

Not sure. Weird behavior. Esp since it's specific to only 1 of the KB2040s.
I am programming using the C/C++ SDK.
This is the Raspberry Pi's Pico SDK?
https://github.com/raspberrypi/pico-sdk

Are you doing anything unique in terms of build environment, compiling, etc?

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

Return to “Microcontrollers”