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 interface

Part Number: TM4C129ENCPDT
Other Parts Discussed in Thread: TPS2052B, TM4C1294NCPDT

TM4C129 support,

I have a list of questions about the USB use on the TM4C129.  The customer is using the TM4C129x as the USB host.  The slave is an RF module connected by USB on a very short cable, 6" or less.  The USB cable will be hard wired in their product.  Power (5V) is provided to the RF module over the USB.

Questions:

1) Do I need shielding for the cables? If so, how should the  shield be terminated?

 

2) Do I have to be concerned with 45/90 ohm traces if I keep lines from micro/radio module, very short, an inch or less?

 

3) I see a lot of USB reference and I think this is due to the option for external phy.  What are the exact pins of the Tiva  that I will require if I need to connect to the radio module that is in slave mode or OTG?  VBUS, D+, D-, Ground?

 

4) Can I connect them both together in a OTG mode and if so, is there any benefit to doing it that way?

 

5)  USB interface will always be connected so is there still a need for USB detection and VBUS?

 

6) If VBUS is required, what is the minimum circuit I need to make this work. I have limited space and really did not want to add a 5V switcher as 5V is not present in my design. I only have 12V, 3.3, and 4V. Since there will be  5V being supplied to anything but VBUS, can I get away with a something really simple off the 12V rail like resistor and zener?

 

7) Do I require an external 5V power supply at all since we are not powering any external devices?

Thanks,

Darren

  • Our USB expert is out recruiting this week so there may be a delay in getting some of your answers. In the meantime, check out the TM4C129x System Design Guidelines as they refer to USB.

    http://www.ti.com/lit/an/spma056/spma056.pdf#page=37

  • Darren Jenkins said:
    2) Do I have to be concerned with 45/90 ohm traces if I keep lines from micro/radio module, very short, an inch or less?

    Might you have intended, "45/90 degree traces" instead?

  • cb1_mobile said:
    Darren Jenkins
    2) Do I have to be concerned with 45/90 ohm traces if I keep lines from micro/radio module, very short, an inch or less?

    Might you have intended, "45/90 degree traces" instead?

    High Speed USB (480 Mbps) specifies a 90-ohm differential trace impedance.

  • Thank you - appreciated.    Following explains how we came to our suggestion: (our use of "intended & instead" was flawed - should have been, "Had you considered?"

    • Poster noted a "very short (assumed USB) cable" - less than 6" in length - between the MCU & (undisclosed) RF Module
    • In addition - client's MCU board listed USB pcb traces as 1" or less - leading to poster's questioning the necessity for exacting "impedance management"
    • My group has learned that (especially for such High Speed designs) optimal semi-conductor design places the highest speed pinouts "Nearest the 'center pins' of the device's pinout array!"    (So that the semi's wire-bonds are then of the 'shortest possible length.') 
    • Use of a ~6" USB cable appears "non-standard" - and thus (may) deviate from the (usual) USB's cable 90 ohm (D+ to D-) impedance. 

    It is the "combination" of those factors - along w/the "Electronic Design article" (extract quoted below) which caused concern.    Should the MCU not locate (both) D+ & D- at/around the 'center of the pinout array' - and (almost) adjacent to each other - then vias and/or trace corners (bends) are likely...

    The article w/in Electronic Design is titled, "At 480 Mbits/s, Signal Integrity Becomes An Issue In USB 2.0 Designs."

    "Trace impedance matching, however, is the key.    Long runs increase the risk of signal degradation due to cross-coupling and noise from nearby devices. Likewise, the distance between traces must be controlled.

    Running signals through vias creates an impedance change that can be significant.   Even 90° corners will create problems.    As data rates go up, these sharp corners can become excellent antennas, radiating energy.    They also impact trace-impedance mismatching because they force additional length on one of the trace pairs."

    It is our belief that 90 ohms is the impedance of the USB cable (between D+ & D- which should be matched) and that 45 ohms is a serial resistance demand - imposed upon each.    Compliance dictates (both) proper "Trace Impedance Matching" as well as "Trace corner avoidance."

    Vendor poster is to be commended for raising these key points 'early' - rather than "assuming/launching prematurely" - leading to reduced board performance.     (and the inevitable "board-spin.")

  • Hello Darren,

    I am more knowledgeable about software but I will try and answer what I can for this implementation:

    Darren Jenkins said:
    1) Do I need shielding for the cables? If so, how should the  shield be terminated?

    USB 2.0 requires cables to be shielded but in reality most cheap cables are not properly shielded.

    The shield should be connected to a chassis ground through a filter network consisting of a very high resistance in parallel with a capacitor.

    "For best ESD and EMI performance, create a chassis ground to which the metal shield of the USB connector is connected."

    See Section 3.3.6 of the System Design Guidelines document for details on chassis ground.

    Darren Jenkins said:
    2) Do I have to be concerned with 45/90 ohm traces if I keep lines from micro/radio module, very short, an inch or less?

    For trace layout, please refer to the System Design Guidelines that Bob posted before.

    Darren Jenkins said:
    3) I see a lot of USB reference and I think this is due to the option for external phy.  What are the exact pins of the Tiva  that I will require if I need to connect to the radio module that is in slave mode or OTG?  VBUS, D+, D-, Ground?

    USB0DP (D+), USB0DM (D-), US0VBUS, and USB0ID are all needed for OTG mode. For Slave mode, USB0ID would not be needed. If the device is self-powered as a slave device, USB0VBUS would not be needed.

    Darren Jenkins said:
    4) Can I connect them both together in a OTG mode and if so, is there any benefit to doing it that way?

    Yes, but based on your comments so far I don't see much of an advantage. The idea for OTG is to allow a device to be both host and slave depending what is attached but based on what is presented so far it would make more sense to do a Host/Slave mode.

    Darren Jenkins said:
    5)  USB interface will always be connected so is there still a need for USB detection and VBUS?

    VBUS would not be needed if the device is in Slave Mode and is self-powered and not being powered from the USB BUS.

    Darren Jenkins said:
    6) If VBUS is required, what is the minimum circuit I need to make this work. I have limited space and really did not want to add a 5V switcher as 5V is not present in my design. I only have 12V, 3.3, and 4V. Since there will be  5V being supplied to anything but VBUS, can I get away with a something really simple off the 12V rail like resistor and zener?

    The VBUS pin should be providing 5V without external components being needed. Incorrect Statement: The USB0VBUS pin does not provide 5V.

  • So to be clear, I have a USB device that is self powered but it has to be used in a slave mode only. Are you stating that if the TIVA is in master mode, it will supply a 5V on the VBUS pin without any external circuitry? 

  • Hello Chris,

    Yes, I do not see any indication that the VBUS pin cannot supply 5V in Host mode in either the D/S or the LaunchPad design. Incorrect Statement: The USB0VBUS pin does not provide 5V. On the LaunchPad, the TPS2052B is a switch that outputs an external 5V signal to VBUS based on the USB0EPEN pin. provides current limit for main 5V power and is used to toggle if the VBUS is supplying 5V based on USB0EPEN but it is not boosting the actual output voltage from the TM4C1294NCPDT.

  • Ralph,

    So you believe that VBUS will be the same voltage that is supplied to the TM4C1294NCPDT?  In this case, I am supplying 3.3V to the 4C129 so  VBUS will be 3.3V? 

    Thanks for all your help,

    Chris 

  • Hello Chris,

    No. VBUS should be supplying ~5V.

    I tested on my LaunchPad and it was at 4.5V when the USB port was left floating and 4.88V when connected to a slave device.

    Incorrect Statement: The USB0VBUS pin does not provide 5V.

  • Ralph,

    To make matters more confusing for me, I have several products that we want to add a USB  channel to between the TM4C129 and a single slave module. All vendors came back with VBUS being a digital input no power source but of course one. They are stating that it is a power input and probably requires 20mA but to be safe they are saying 50-100mA. I will try and get them to lock down on the actual current.  This now means I have two options

    1) Tiva can supply the current and we are done

    2) I have a 3.9V rail that is available to supply the current

    These two options lead me to a few questions.

    How much current can Tiva supply? 

    If I connect V_BUS to 3.9V directly all the time, is there any issue? Do I need any supporting circuity or will a direct connection do? The USB will be connected 100% of the time as it will be hard wired. 

    Thanks,

    Chris 

     

  • Hello Chris,

    I have take a big step back here - and I sincerely apologize for the misunderstanding on my end which led me to give you incorrect answers.

    After doing some more digging into the way the USB interface is designed in our reference designs and the datasheet, it's become apparent that the USB0VBUS pin does not provide 5V.

    So you will need a 5V source outside of the TM4C12x to provide the 5V signal for VBUS.

    What is done with our LaunchPad's and in general is a recommended practice which had let to my misunderstanding due to incorrectly reading the schematic is to use a power switch such as TPS2052B to control the output of the VBUS based on the USB0EPEN signal. The USB stack handles the power output to the device based on specific states of USB communication and toggles USB0EPEN when configured to only provide VBUS when needed.

    You could forego this if you have a closed loop system where you know devices that require VBUS power will always be present and those devices do not care that VBUS will always be present. If that is the case then you can save the board space provided you validate your system works like this.

    With this understanding in mind, Moving back to the original question:

    chris summit said:
    6) If VBUS is required, what is the minimum circuit I need to make this work. I have limited space and really did not want to add a 5V switcher as 5V is not present in my design. I only have 12V, 3.3, and 4V. Since there will be  5V being supplied to anything but VBUS, can I get away with a something really simple off the 12V rail like resistor and zener?

    I would hesitate to drop down the 12V to 5V myself with just a resistor and a zener due to the current draws you mention. You probably need a buck converter here because the 7V drop at up to 100mA would need some pretty beefy resistors just to handle that in normal operation and that wouldn't protect from potential higher current draws on spikes or error cases, so I wouldn't feel comfortable without a buck personally.


    Just want to add at the end here a second apology for guiding you down the wrong path at first. I picked up support USB for the device a few years ago, so it's not that I am new to USB on these devices, but everything I had done thus far was software and USB stack based. This is the first real question about how the device handles VBUS from a voltage standpoint I've dealt with and I made some mistakes on my end.

  • If an "Outsider, non TM4C129 user" may ... would it not prove (both) safer & more flexible to be able to, "Switch VBUS On & Off?"   (as opposed to a design in which it is "always" present ... i.e. recognize those cases in which the 'connected' USB Slave requires a periodic Reset (POR) and/or the Slave fails - both conditions greatly enhanced thru (VBUS) Power Management/Removal!)

    While I border upon skill/clue-less w/the '129 & VBUS - the ability to "Switch & Selectively Control VBUS" (as past provided) appears to warrant consideration...

    Vendor's Ralph has "Aided many" - and he is far from "alone" - in running afoul of the "many nooks & crannies" offered up by USB...

  • Hi cb1,

    Absolutely agree. Would need some careful system design and it would be very inflexible to forgo the control circuitry for the VBUS signal as used on all our USB Host capable EVMs. You may be able to get away with it for something like a USB stick, but more complicated devices run into the issues you mention. Hence the need to validate in the full system as what may sound good in theory could bring too many potential perils in the actual application.

  • Hi Ralph,

    Indeed - young staff & I "Felt the need to write" in counter to Mr. Summit's, " If VBUS is required, what is the minimum circuit I need to make this work?"    

    Through the years - such "minimum circuits" - unless: very well characterized, suitably exercised, and life-tested - prove likely to present, "Control Limitations and (even) elements of risk!"

    My staff's suggestion of, "Exercising Command/Control over VBUS" appears vastly superior to (any) "Fixed, Locked-Down VBUS" - which appeared to result from the "minimum circuit!"      In terms of "Risk-Reward" - there is NO comparison - VC's (rightly) shy away from most all "minimum circuits" implemented w/out the necessary discipline we've earlier noted...     (glad that you too - agree...)