2 Replies Latest reply on Apr 21, 2017 3:16 PM by Intel Corporation

    USB OTG problem on custom board

    JelleRoets

      I designed a custom board for the intel edison, including the USB OTG connector. However I'm having trouble connecting usb devices on my custom board, while the same setup but on the Intel Edison Breakout Board just works fine.

       

      To give some more details:

      1) As a reference I first tried my setup with the Intel Edison Breakout Board. I connect my usb slave device to the USB OTG port, the lower connector (J16) on the breakout board, using a usb micro OTG to usb A cable. My slave device powers up and connects to the edison. On the edison the results of  `dmesg | tail` and `lsusb` are:

      Edison:~# dmesg | tail
      [  475.760836] pmic_ccsm pmic_ccsm: USB VBUS Detected. Notifying OTG driver
      [  476.012794] usb 1-1: new full-speed USB device number 2 using dwc3-host
      [  476.037583] usb 1-1: New USB device found, idVendor=d3e0, idProduct=601a
      [  476.037615] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
      [  476.037636] usb 1-1: Product: Dwenguino Board
      [  476.037655] usb 1-1: Manufacturer: Dwengo LLC
      [  476.081746] cdc_acm 1-1:1.0: This device cannot do calls on its own. It is not a modem.
      [  476.082054] cdc_acm 1-1:1.0: ttyACM0: USB ACM device
      [  476.090420] input: Dwengo LLC Dwenguino Board as /devices/pci0000:00/0000:00:11.0/dwc3-host.2/usb1/1-1/1-1:1.2/input/input3
      [  476.091448] hid-generic 0003:D3E0:601A.0002: input,hidraw0: USB HID v1.01 Mouse [Dwengo LLC Dwenguino Board] on usb-dwc3-host.2-1/input2
      Edison:~# lsusb
      Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
      Bus 001 Device 002: ID d3e0:601a  
      Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
      

      This correctly shows that Linux found a new USB device (Dwenguino Board with id "d3e0:601a") and assigns "ttyACM0" which I can now use to communicate with my device.

       

      2) Now I want to do exactly the same on my custom board: While designing this board I based the schematics of the usb part on the Schematics for the Intel® Edison Breakout Board and the SparkFun Block for Intel® Edison - Base - DEV-13045 - SparkFun Electronics. Here you can see the part of my design concerning the usb connection (full eagle design files are connected as attachment)

      When I now connect my usb device to the usb connector on my custom board. My device powers up correctly: this means the USB power circuit is working correctly: the intel edison correctly recognises my device as a slave, since the ID pin is connected to ground, as a consequence the PSW signal is put high, which powers up the VBUS line to +5V. The Fault line stays high, which means no power issue (verified using a multimeter). However Linux doesn't recognise my device here. The console output is:

      Edison:~# dmesg | tail
      [ 1356.304043] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003
      [ 1356.304070] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
      [ 1356.304091] usb usb2: Product: xHCI Host Controller
      [ 1356.304111] usb usb2: Manufacturer: Linux 3.10.98-poky-edison+ dwc-xhci
      [ 1356.304130] usb usb2: SerialNumber: dwc3-host.2
      [ 1356.306088] xHCI xhci_add_endpoint called for root hub
      [ 1356.306110] xHCI xhci_check_bandwidth called for root hub
      [ 1356.306447] hub 2-0:1.0: USB hub found
      [ 1356.306492] hub 2-0:1.0: 1 port detected
      [ 1356.360877] pmic_ccsm pmic_ccsm: USB VBUS Detected. Notifying OTG driver
      Edison:~# lsusb
      Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
      Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
      

      As you can see it has detected the connection of the OTG cable, but it can't find my device. Also when I observe the D+ and D- lines with my scope I can't see any signals (but the pulled up D+ line).

       

      => Since everything works perfectly with the Breakout Board but fails on my custom board, I guess it is a hardware issue on my board. Does someone has any idea what might cause this issue or any advice how to solve it?

       

      My initial thoughts:

      - Wrong schematic: however I checked and double checked it compared to the reference design and it seems exactly the same! Also the power circuit is working fine, as well as the ID line, since the edison recognises the OTG cable.

      - So the problem must exist on the D+ / D- lines. Maybe a bad connection, especially since the Hirose connector is very hard to solder correctly. However I checked all the connections, using a multimeter: both the D+ and the D- lines seems to connect from the corresponding pin on my usb device (through the usb cable and solders) to the correct pin on the Hirose connector, without shortcuts to neighbouring signals.

      - maybe bad connection between the hirose connector and edison itself, however this seems to be unlikely since all of my other gpio pins works perfectly.

      - maybe unmatched trace-length between D+ and D-: however the difference between the D+ and D- trace on my pcb is only 0.1 mm, which is less than the trace length difference on the Sparkfun design.

       

      I'm probably not the first one having issues like this: I found some very similar threads:

      - i have problem for USB detected by custom Edison board

      - USB OTG on custom board not working, where to get detailed log?

      - Customized Edison PCB design Issues

       

      Do you have some USB pcb design rules or do you see some problems on my current design (bad ground plane shielding, cross talk to traces on the bottom,...)?

       

      Thanks for your help!