This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TM4C129ENCPDT: USB D+, D- polarity important?

Part Number: TM4C129ENCPDT


Does the D+ and D- polarity matter for USB communications? I ask because we built a custom board and now discovered these two traces are reversed. PL6 is connected to D- and PL7 is connected to D+.

  • My friend - Why would you risk this? Even if "this batch" of MCUs (may) work - or appear to work - there is NO Guarantee that "different lots" will behave in the identical manner.

    The fact that such "polarity markings" are,  "so well & repeatedly listed"  - suggests rather strongly that, "Compliance is preferred & directed!"

  • It is a 1st prototype of a brand new PCB design, being used in lab only. It contains plenty of other mistakes as well, but that doesn't mean we're going to trash it and spin another board. Not until we are pretty confident that we've discovered the remaining mistakes.

    Before we noticed the D+/D- being reversed, we tried porting one of the TivaWare USB examples to this board to test USB functionality. And... You guessed it: It isn't working. Power to the port works correctly but devices do not enumerate.

    I asked if polarity matters because I don't want to perform surgery on the board to reverse the traces only to discover that it changes nothing. Should we perform the surgery, or is it likely to be a software error anyway?
  • Hello twelve12pm,

    You can't have the polarity lines flipped unfortunately. The USB interface will try and establish initial communication but due to the polarity being flipped won't end up configuring right. There are articles on stackoverflow you can find if you want to read into more of the details, but as far as the question at hand - you have to fix that issue for USB to be functional.
  • We have gone ahead and performed the surgery on the board. The D+ and D- signals are now routed correctly to the USB connector, and miraculously, the usb_host_msc test we modified for our board is working.

    The funny thing is that several people stared at the board, datasheet, TM4C129 design guidelines, TivaWare USB library documentation, the TivaWare example program, the software we modified for our board, etc., etc., and our eyes were so glazed over that we didn't notice the simplest thing -- the wires were crossed. Don't you just love those simple errors that escape detection?

    Thanks to cb1 and Ralph Jacobi for your help.

  • You are FAR from alone in such staring - even as a group - especially as a group - and then "missing" an item of importance.     This proves so (as we learned in the Army) due to the human eye first noting motion - then brightness - contrast - color...     When the target field is static - attention notably drops off.    And - when the "n+1" viewer arrives - knowing there have been "n" earlier views - n+1's "focus" is unlikely to "sustain & almost never peak."

    So - can anything be done - to remedy such an issue?     Certain board houses - for a fee - have advanced, automated means to verify your net-lists.    We've witnessed both, "Traveling test pins, and very fine pitch fixed ones", both able to "far exceed" any "human board inspector."     There are also "optical means" to scan boards - yet these  "top out" @  2-sided boards.

    Any newly designed  board proves an "adventure."    If (any) volume is contemplated - engaging a board house w/proper, "Net-List" verification capability - makes great sense...

  • It's wonderful that the board house can perform the automated test to verify that the board matches our net-list. That will catch build quality problems such as solder bridging, bad vias, etc.

    There's only one problem: We made the mistake of reversing the D+/D- signals during schematic design. The EDM software turned the faulty schematic into the PCB net-list. So if we pay the board house to verify the boards, they will verify that the boards do indeed follow our faulty net-list. The trick is how to detect that the net-list itself is wrong. I don't think anyone can do that because that person would be your "n+1" viewer.
  • Most always - any/all "ICpins or connection points" - bearing such "polarity markings" - deserve increased scrutiny - even at the "schematic level" - especially at the "schematic level!"    (as you well note - any error here is certain to propagate into the pcb!)       Our firm demands a minimum of TWO to review - and agree/(sign off on) - the schematic's execution.

    it would appear that such "polarity emphasis" was not recognized - or that the schematic review was (simply) faulty - for any number of reasons.

    You wrote also of the board house, "catching build quality" (solder bridge, bad via, etc.)      It has been my experience that this proves, "Not the case" - ONLY unassembled (naked) pcbs are so tested.     The "flying/travelling" (expensive) test probes are (almost) certain to be damaged - when invited to engage a "populated board" - again "this proves outside" - firm's/my experience.

    Indeed there ARE "Bed of Nails" methods - which "Can and Do" accommodate assembled boards - but these differ from the "Bare Pcb Test" (performed by the board vendor) as earlier described!

  • There is a bed of nails that performs a "live" electric test with automated testing of all signals of interest. I've never seen one in person but I have seen them in videos. But once again, that will only catch errors it is specifically programmed to catch.

    You are right that we should check and double-check polarity markings extra carefully. GPIOs can always be remapped. GND and VCC, well if you mix those up you'll notice right away! :-)
  • twelve12pm said:
    GND and VCC, well if you mix those up you'll notice right away! :-)

    So true - and I am (still) "Living Proof of that!"     Under intense client time-pressure - I made rapid changes to our motor-driver pcb - and then, "REVERSED the Power Inlet Polarity!"    (normally our connector scheme prevents this - under "rush" I "bypassed!")  

    The (once) Filtering Electrolytics  "signaled their displeasure" ... ... when the smoke (somewhat cleared) and "hearing restored" -  it was agreed that (too often) "Haste makes Waste!"

  • Ah, those electrolytics go out with a bang, don't they? That reminds me of the time my colleagues and I fried a PCB with a bunch of big tin can darlington transistors. Had it been a pyrotechnics contest, we would have won first prize.