1

I am designing a custom board using the RP2040 and have used the PiPico design as a reference design. I have encountered two problems with micropython:

  1. First, an anomaly - I noticed when mounting as a USB drive in bootloader mode to copy the micropython, that in the PiPico the current micropython runtime is listed. However in my design, when mounting again after copying the runtime previously, it does not show up in the file listing. I find this difference to be suspicious and therefore I suspect I have a hardware design flaw.
  2. On one of the board builds, the serial port over USB only shows up after flashing a new micropython runtime. Any reset of the board or repowering fails to show a serial port again. This only has happened on one board only, thus far at least two other boards have no problem always showing the serial port. Again, in light of item 1., this makes me suspect there may be a hardware design problem.

I know this information is vague, but are there any suggestions on where I should begin to look to solve this problem and anomaly? Everything else seems to work just fine. I can upload code and it seems to run okay. I would be interested in how micropython handles the uploading of its runtime. It seems weird that subsequent mounting of the USB as a drive fails to show the runtime previously loaded.

[UPDATE] Here is the schematic: enter image description here

And the PCB: enter image description here

Scott
  • 171
  • 4
  • You suspect a hardware problem, but you have not described your hardware at all. How could we possibly offer any advice? – Dave Tweed Dec 13 '22 at 13:02
  • Can crystal mistiming (wrong cap values) cause these kinds of USB problems? How does the RP2040 handle the firmware loaded on to it? On the PiPico, after it is loaded, the firmware file still shows but has zero bytes. In my board, of course, it fails to reappear at all. – Scott Dec 14 '22 at 18:55
  • #1 is normal and documented. Stuff you write to the MSC filesystem isn't supposed to read back. It only goes to ROM (if it's a valid and complete UF2). – hobbs Dec 14 '22 at 18:56

1 Answers1

0

There appears to be a problem with the USB input circuit. The 22ohm resistors RU1 & RU2 should be in series with DU1, not in parallel. This could result in problems with USB communication.

In addition, according to the official hardware design guide (https://datasheets.raspberrypi.com/rp2040/hardware-design-with-rp2040.pdf) the D- & D+ lines must be impedance matched, kept as short as possible, and 27 ohm resistors (instead of 22 ohm) should be placed close to the RP2040 chip.

Scott
  • 171
  • 4