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.

TM4C123GH6PM: Question on USB speed

Part Number: TM4C123GH6PM

Hi,

I have been trying to figure this out but what is the default USB speed of the TM4C? I noticed that in all the examples I looked at such as the qs logger and usb serial, no function call is made to set the speed to full speed or low speed. How do you set the speed? Any examples would help. I also searched the USB API documentation and there's not mention of low speed or "low-speed" at all just by doing a word search and full speed is only mentioned with regards to the TM4C1294 USB ULPI.  According to the TM4C datasheet the device could operate at low and full speed but so far, I could not find a line of code in the examples or a function that lets you select the speed. 

Thanks.

AJ 

  • Purely a "swag" - might you glean (some) usable direction via a repeated search of the '1294 USB's examples (assumed there are some) and a listing of any/all MCU USB registers.      (which hopefully - extend to the '123 - and enable your reasonable, "USB Speed Control" objective.

  • Hi,
    I think the speed is determined by how you pullup on the DP signal line or the DM signal line of the USB port. The first thing the USB host does is to attempt to send /receive packets at high speed to the USB device. If the communication is successful it will be assumed that the USB device is a high speed device. If this initial communication fails then the USB host assumes that the device is a full speed device. A low speed USB device (1.5Mbps) will have a 1k5 pull-up resistor to VCC on the USB DM signal while a full speed USB device (12Mbps) will have a 1k5 pull-up resistor to VCC on the USB DP signal line.

  • Hi Charles,

    That's most helpful information - thank you - always appreciated.

    In each case you've noted the treatment of  "just one"  of the USB signal lines.     Are the others (properly) left connected to the appropriate MCU pins - only?

    Here is an extract from the "4C123 LPad"  (the basic one - appropriate for moi)  and (neither) the schematic nor the pcb itself -  reveals "a placeholder" for the insertion of (either) such "pull-up" resistor.    So - with neither pull-up resistor (easily) installed upon this LPad - what speed may we (bit hapless) users expect?    (was that not a "herd of Turtles" - seen, "Shouting at & Hi-Beaming  "AJ" - so they may PASS?)

    Of course - if (both) "R25 & R29" are added/inserted - then access to (both) "USB DM & USB DP" may be "kludged" via connection to the "unused side" of the LPad.     (assumes one side is unused)

    Firm/I have "yet to employ" the LPad in USB mode - we thank you for your contribution here - and  bit painfully  "seek yet more" - should you have the time & energy.    Thanks your indulgence & kindness...

    And - if I may - "Props" to poster "AJ" - for identifying this "limitation w/in the documentation" - and then presenting such here - to the (potential) benefit of (many)...

  • Hi cb1,

     That is a good question on what speed the USB will operate if pull up is absent in both DP and DM lines. I will need to do some research and get back with you. I'm currently away from my computer.

  • Hi Charles, cb1,

    Thank you for all your input. I was under the impression that the resistors could be set internally but I'm not sure. I do not see an API function that let's you enable such resistors by selecting a speed as an input argument to the function. My first thought was that there are probably USB registers that would take care of that - Kinda like enabling pull ups on input pin. None of the examples and nothing in the datasheet shows anything. Perhaps i missed something because  I just did keyword searches - "low speed", "low-speed, " "full speed" etc and none of these searches led me anywhere.

    Regards,

    AJ

  • Ola AJ,

    Having past worked @ a similar "semi giant" I am doubtful that such resistor - internal to the MCU - can come "near" the 1K5 value - Vendor's Charles has noted.     (usually such internal Rs exceed 50KΩ)

    I continue in the belief - that your (bit deeper) dive into that '129 device/data - may provide (something) of  "Higher Speed" value."     (maybe)

  • Hi cb1,
    Sorry for the late reply. I find the below note in the USB chapter of the datasheet. The 1.5Kohm pullup is internally connected to DP signal to indicate the device is full-speed capable so there is no need of the pullup externally.

    The termination resistors for the USB PHY have been added internally, and thus there is
    no need for external resistors. For a device, there is a 1.5 KOhm pull-up on the D+ and for
    a host there are 15 KOhm pull-downs on both D+ and D-.