0
\$\begingroup\$

I've build a PCB based on RP2040 microcontroller. A modified version of PicoDVI board - with added memory chip.

The board works fine, with just one problem - it is not being detected when plugged to a PC. Powering the board from USB does work. The same firmware written do a Raspberry Pico board works just fine, being visible as USB serial.

Any hints what did I do wrong or how to debug the issue?

In case you want to see, my board is here: KiCad PDF.

\$\endgroup\$
7
  • 3
    \$\begingroup\$ Be sure that the USB cable has data wires as well as power wires. I was caught out by that recently despite long experience. \$\endgroup\$
    – Russell McMahon
    Commented Jul 16 at 0:51
  • \$\begingroup\$ Could you please point to specific device datasheet and your final assembly schematics? I don't have time nor skills to wade through hundreds of your project files (kicad and other junk). \$\endgroup\$ Commented Jul 16 at 1:09
  • 1
    \$\begingroup\$ need screen image or PDF of schematics to look at details, as I don't have tools to open your source files. Shot in the dark -- Last time I hit similar issue during bringup of new board, the cause was that the VBUS input from connector was not fully connected to the VBUS_DET input on the microprocessor, so the microprocessor was not sensing host attachment and thus not starting the USB device-side data pins handshake. Also double check if the micro's VBUS detection pin input is active high or active low, as sometimes you need open-collector inverter in the path. \$\endgroup\$
    – BK303
    Commented Jul 16 at 1:37
  • \$\begingroup\$ I don't really get why my question is closed. OK, I understand that you do not want to answer the question - then don't. But why forbid people which are able to open KiCad files to try answering my question? I don't get it… \$\endgroup\$
    – smokku
    Commented Jul 16 at 22:53
  • 1
    \$\begingroup\$ @smokku Generally, questions must be standalone. Nobody should be forced to download files or install a program to view your files. You on the other hand have all the files and tools needed to make pictures out of them and add to the post for it to stand alone and save evryone's time. Not many people will watch a 30 mins of Youtube video either to answer a question. It's possible most people that could answer the question simply don't use KiCad. \$\endgroup\$
    – Justme
    Commented Jul 16 at 23:14

1 Answer 1

2
\$\begingroup\$

Any hints what did I do wrong or how to debug the issue?

First of all, you need to check voltages on D+ and D- lines after the board gets power, and make sure that D+ is D+, and D- is D- for PC host side.

In initial state, the D- must stay low, and D+ should go high (3-3.3V). This is the basic signaling to the host to start USB communication in FS mode.

If the D+ is high, USB host will detect the connect event and will make an attempt to enumerate the device. If the device is not responding, the system will say something like "fail to get device descriptor" or "transaction error".

Usually (by USB specifications), a device will not start connection if the device logic does not sense incoming VBUS. Usually the devices do have a special logic input to sense the VBUS. If D+ does not go high, it means that the device logic didn't sense this signal, either you forgot to connect VBUS to GPIO1 (USB VBUS DET), or forgot to configure this signal in FW.

If there is USB activity but you still have "device descriptor error", you will need a USB analyzer. For FS mode it should be easy to find.

ADDITION: The Rpi Pico board does have a VBUS voltage divider (level translation) connected to GPIO24. Apparently this pin is configured in software as VBUS_DETECT, which enables the USB functionality. In your schematics the GPIO24 is not connected to anything like VBUS. It is likely why the code works on RPi PICO but not on your board.

\$\endgroup\$
3
  • \$\begingroup\$ Exactly, called possible missing VBUS_DET (USB host detect) yesterday in my comment, been burned by that before.... Following what Ale said above, if GPIO24 is the VBUS detect on other designs with same processor and base software, then tie high to +3.3V supply which is derived from VBUS and see what happens. Also there could be configuration parameter on the USB driver to assume hardwired connection to host (at least when micro has power, which is the case here), that will cause the driver to ignore VBUS input and initiate connection immediately. \$\endgroup\$
    – BK303
    Commented Jul 17 at 3:04
  • \$\begingroup\$ If activating VBUS_DET is not the solution, then follow good advice above from @ale-chenski about D+/D- probing to figure out which side is not attempting to bring up the link. \$\endgroup\$
    – BK303
    Commented Jul 17 at 3:05
  • \$\begingroup\$ @BK303, there is also a bunch of status registers described in the 2040 datasheet, for a SW person it might be another step to understand the controller status, again by dumb comparing them with the Rpi PICO reference. \$\endgroup\$ Commented Jul 17 at 3:37

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