1
\$\begingroup\$

I have been working on a PCB design for a few months now and I cannot get the USB function of the MCU to function properly.

The board uses an Atmel ATSAM3X8E as the MCU and is based on the design of an Arduino DUE, I am able to program and operate the chip via separate serial pins which shows that the chip is functioning as normal, but I cannot get windows to recognise the chip as it should, the only change from the USB function on the DUE I have made is changing it from micro USB to USB C (by connected two pulldown resistors instead of an ID pin).

This chip comes with a bootloader burned into it from Atmel which means that when it is reset and erased this bootloader is initiated and it waits for either USB enumeration or bits via the serial pins (detailed in chapter 20 here)

When I reset and erase the Arduino Due, which should put it back into this default state, it shows in windows device manager as BOSSA PROGRAM PORT which is correct and what I expect my boards to show as. But when I connect my boards to windows I receive "Unknown USB Device (Device Descriptor Request Failed)".

My suspicion after trying a lot of solutions is that there is a problem with the USB lines causing interference and making it difficult for windows to receive clear data.

Now, I have managed to get the USB to recognise and work briefly but unreliably after programming the board with the Arduino IDE, but this only worked when using a different USB cable which only worked in one orientation, which threw me off even more. I'm not sure if this proves that the USB connections are working fine or not

I believe I have routed the USB lines currently as I know they have to have controlled impedance. I used JLCPCBs 2 layer board stack up and an impedance calculator to work this out.

If anyone could help me to figure out this mystery it would be much appreciated. enter image description here enter image description here enter image description here enter image description here enter image description here

\$\endgroup\$
7
  • 3
    \$\begingroup\$ Have you really used a spacing of 0.04mm?? That's less than 2 thou, far smaller than most board houses will go. I'd be suprised if the traces aren't shorted out. \$\endgroup\$ Dec 30 '20 at 11:39
  • 1
    \$\begingroup\$ The stubs you've created with those traces to D1 & D2 are not ideal. What USB speed are you running at (Low/Full/High)? \$\endgroup\$
    – brhans
    Dec 30 '20 at 13:46
  • \$\begingroup\$ @TomCarpenter well spotted, fresh eyes always help. They don't short out but the gap between them I have specified is less than what JLCPCB have as their minimum spacing (0.127mm), I presume they must have defaulted the gap to their minimum which could have changed the impedance, think this could be the cause of my issues? \$\endgroup\$ Dec 30 '20 at 18:10
  • \$\begingroup\$ @brhans Running at High-Speed USB 2.0 \$\endgroup\$ Dec 30 '20 at 18:33
  • 2
    \$\begingroup\$ a spacing of 0.04 mm is far too small, any board house that lets you specify traces that close together is going to charge you lots of money for it. Try a design with like ten times that spacing! ...how does that design pass DRC anyway? \$\endgroup\$
    – Hearth
    Dec 31 '20 at 17:03
1
\$\begingroup\$

@Tom Carpenter and @Hearth were indeed correct, the problem was with the gap between the two data line. I had set the gap to be smaller than JLCPCB's capabilities, DipTrace didn't throw up an error even though I had set the minimums and JLCPCB just printed the gap to their minimum width which gave me the wrong impedance on the differential pair.

\$\endgroup\$
1
  • \$\begingroup\$ Hi, Thanks for coming back and reporting what the problem was. Since your problem is solved, please "accept" your answer (green "tick") to close the topic / question & remove the question from the unanswered list. Thanks, \$\endgroup\$
    – SamGibson
    Jan 15 at 23:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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