Custom board with RP2040 impossible to flash using USB

RP2040 based microcontroller boards running MicroPython.
Target audience: MicroPython users with an RP2040 boards.
This does not include conventional Linux-based Raspberry Pi boards.
Post Reply
Woldrajh
Posts: 1
Joined: Mon Jul 11, 2022 2:16 pm

Custom board with RP2040 impossible to flash using USB

Post by Woldrajh » Mon Jul 11, 2022 2:18 pm

Hi,

I just finished a custom board using a RP2040 based on QT RP2040 PY designs. I tried to flash it over USB but the CPU is not recognized, even using MU editor (I developped everything using circuitPython and I would like to use the same configuration with my board ; drag and drop files is pretty convenient...)

I check all pins : voltage levels and pinout (including USB) is correct.

I tried to tie down RUN / CS of the flash but nothing changed

Is there a first flash to achieve using SWD ? Like for installing a kind of USB bootloader or anything ?

Anybody can help ?

Best

User avatar
jimmo
Posts: 2754
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: Custom board with RP2040 impossible to flash using USB

Post by jimmo » Mon Jul 11, 2022 3:01 pm

Woldrajh wrote:
Mon Jul 11, 2022 2:18 pm
I tried to flash it over USB but the CPU is not recognized, even using MU editor (I developped everything using circuitPython and I would like to use the same configuration with my board ; drag and drop files is pretty convenient...)
What do you mean by "CPU is not recognised"? Does anything enumerate on USB? What does "lsusb" show?

The bootloader is in ROM, you don't need to install it. It should run automatically if flash CS is pulled low. (The Pico uses a 1k pulldown).

Lobo-T
Posts: 36
Joined: Tue Nov 16, 2021 2:36 pm

Re: Custom board with RP2040 impossible to flash using USB

Post by Lobo-T » Tue Jul 12, 2022 12:11 pm

Similar problems have been discussed several times on the Raspberry forum.

Have you tried programming it through SWD instead of USB?

The most common problems seem to be:
1) Incompatible second stage bootloader. You need the second stage bootloader for the flash IC you have actually used. Or use PICO_BOOT_STAGE2_CHOOSE_GENERIC_03H 1
2) Slow starting oscillator. You can set PICO_XOSC_STARTUP_DELAY_MULTIPLIER 64, or higher.
3) Wrong value for the 27 Ohm series resistors on the USB lines.

https://forums.raspberrypi.com/viewtopi ... 4#p2000704

smm
Posts: 1
Joined: Wed Mar 30, 2022 7:26 pm

Re: Custom board with RP2040 impossible to flash using USB

Post by smm » Thu May 09, 2024 10:53 pm

Lobo-T wrote:
Tue Jul 12, 2022 12:11 pm
3) Wrong value for the 27 Ohm series resistors on the USB lines.
How precise does the value of the series resistors on the USB lines have to be?

Post Reply