1
\$\begingroup\$

I designed a PCB that uses the RP2040 microcontroller. I just received it and wanted to power it up and put my code onto it, but it doesn't seem to work fine. I am struggling to find out what could be the reason, since there are so many possibilities. Here's the schematic and a screenshot from KiCad with the PCB:

Schematic

PCB

(I used a power plane on the top layer to get the power everywhere, I removed it here so it is clear how the traces were made. This is my first design, so any advices regarding the layout would also be greatly appreciated.)

It seems to be powered just fine, I verified it with a multimeter and components are getting power, but when I try to go into BOOTSEL mode (by connecting FLASH_BOOT in J4 to ground and restarting), it doesn't show up on my PC as a USB mass storage device. I have a special connector with USB- and USB+ pins exposed (J4), which I connect to my PC through a breakout board with an USB-A plug (like this one: https://www.pololu.com/product/2585). I think maybe this is the part where I got something wrong - I think the microcontroller is working fine, but the USB connection is not working properly.

Any help would be greatly appreciated.

\$\endgroup\$
11
  • \$\begingroup\$ Isn't USB data on pins 2 and 3? Is this a single sided PCB? \$\endgroup\$
    – Andy aka
    Nov 17, 2021 at 14:25
  • \$\begingroup\$ Your USB connector has no ground. How is it supposed to work and be connected to PC without ground? \$\endgroup\$
    – Justme
    Nov 17, 2021 at 14:33
  • \$\begingroup\$ @Justme I connect 3V and ground through J1 connector on the bottom left and then have a ground plane on the other side of the PCB. Isn't this enough? \$\endgroup\$
    – Adam
    Nov 17, 2021 at 14:47
  • \$\begingroup\$ @Andy aka: According to the datasheet, USB+ and USB- are pins 47 and 46 respectively (datasheets.raspberrypi.com/rp2040/rp2040-datasheet.pdf), so I think they are connected correctly here. \$\endgroup\$
    – Adam
    Nov 17, 2021 at 14:47
  • \$\begingroup\$ @Adam I have no clue how you have connected this in a larger scale, but you need a ground reference connection to PC. If the devices are not on same ground potential, you'll risk damaging USB data pins on your board or PC. Even if they are on same ground potential, it may still not work if the grounding is not done via USB cable. How do you power this board? How are all the devices, boards and power supplies wired as a whole? \$\endgroup\$
    – Justme
    Nov 17, 2021 at 16:04

2 Answers 2

2
\$\begingroup\$

Just a few comments on your design, which may or may not be the root cause of your problem.

I'll refer to the official guide.

  • you've exiled the decoupling capacitors (C1-C11) to a corner of the board, which sort of defeats the purpose: each decoupling capacitor is supposed to serve one specific pin of the RP2040, maybe two adjacent pins if space is tight. They're not meant to graze all together in the shadow of a tree at the other end of the field ;-) This means the VCC trace between each capacitor and its corresponding pin should be direct (not taking any detours through vias or around another part) and short (2-3 millimetres max, ideally). Refer to section 2.1.2 and 2.1.3, and note the comments re: pin 44 and 45 on figure 5.

  • The "debug reset" section doesn't look right. How can the RESTART signal affect the RUN signal when that one is directly tied to VCC? It looks like R8 and C15 where meant to be some sort of debouncing filter, but the schematic is probably incorrect and these two parts (R and C) are also located at different ends of the board when they should be next to each other.

  • There is no impedance control on the USB data lines (see section 2.4.1). This is potentially problematic although it's hard to say whether it's fatal on this particular design. Cabling between J2 and the pololu breakout board could also be an issue if D+ and D- are not twisted together.

  • Crystal oscillator: is the part ref (TXC 7M1200044) correct? According to the datasheet, the crystal is between pins 1 and 3, not 1 and 2. KiCad has several generic crystal symbols depending on the pin configuration, you may have picked the wrong one. That would definitely be fatal ;-)

\$\endgroup\$
7
  • \$\begingroup\$ Thank you for the response. Regarding the capacitors: "trace between each capacitor and its corresponding pin should be direct" - what if I have one, big power plane on the top layer? From what I understand it seems like it is all connected at once then, right? There's no direct connection between a pin and the capacitor. Is this a proper way of doing this? Regarding #4: Yes, it definitely looks like I made a mistake when looking at the datasheet and connected it to the wrong pins! I'll have to fix this and read up on the USB impedance control too. Thanks. \$\endgroup\$
    – Adam
    Nov 17, 2021 at 17:13
  • \$\begingroup\$ One question though - what do you mean by D+ and D- being "twisted together"? \$\endgroup\$
    – Adam
    Nov 17, 2021 at 17:13
  • \$\begingroup\$ @Adam no, that's not a proper way to do it. The power plane is a good way to bring power from the power supply to the decoupling capacitor, but the path between the decoupling capacitor and the pin still needs to be as short as possible to minimize parasitic inductance. Essentially, if the capacitor is far away from the pin, it can't react fast enough when the chip requires bursts of currents. See how it's done in figure 6 of the hardware design guide. \$\endgroup\$
    – DamienD
    Nov 17, 2021 at 17:24
  • \$\begingroup\$ As for D+ and D-, see "twisted pair" on google images. \$\endgroup\$
    – DamienD
    Nov 17, 2021 at 17:24
  • 1
    \$\begingroup\$ Oh my god, thank you for posting this answer. I was in the same boat as OP, and on the third revision of my board that still didn't work. Morale was dropping fast, but it turns out I just chose the incorrect footprint for the crystal. I added in a bodge wire to the correct pad and it worked beautifully. Thanks! \$\endgroup\$
    – tjhorner
    Apr 12, 2022 at 3:20
0
\$\begingroup\$

As per your comment, you connected 5V from USB as the chip supply, while absolute maximum rating for the chip is 3.63V.

The chip is most likely damaged.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.