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: USB device not recognized by PC

Part Number: TM4C123GH6PM
Other Parts Discussed in Thread: EK-TM4C123GXL, EK-TM4C1294XL

Hello,

I built my own TM4C123G6PM board and it seems the USB hardware isn't functioning properly for some reason, I tried the "usb_dev_serial" and "usb_dev_bulk" examples for EK-TM4C123GXL board from the Tivware, first when I plug the USB to the machine it's not recognized right away (my guess is something went wrong in the enumeration process), then after 30 seconds or so I get the Windows message "USB device not recognized". Did anyone face a similar problem with the same microcontroller?.

Running the same examples on it's bigger sister (TM4C1294 Tiva C Connected Launchpad) works well without any issues.

I have attached the schematic of the TM4C123G I'm using, along with a screenshot of the error. The OS I'm using is Windows 10.

Thanks.

  • Hello Karim,

    Can you double check in your code that you are using eUSBModeForceDevice as the parameter for the USBStackModeSet function? It should be if you are using an unmodified TivaWare project, but that is definitely something needed based on your schematic as USB0ID is not connected.

    What speed crystal do you have attached to the board and what are the parameters for your SysCtlClockSet call?

    Have you tried to find the board in Device Manager and install the latest Windows Drivers? (Either from 2.2.0.295 or the PATCH file for 2.1.4.178)

    Lastly, might sound silly but, did you try a different USB cable? We've seen faulty cables cause issues before. Good sanity check!

  • Hi Ralph,

    Thanks for looking into the issue with me. Let me answer your questions in the same order:

    - Yes, the eUSBModeForceDevice option is set:  USBStackModeSet(0, eUSBModeForceDevice, 0);

    - According to the example I'm running on 50 MHz, external crystal is 16 MHz, along with 32.768 KHz hibernation crystal. This is the code for the current clock.

    ROM_SysCtlClockSet(SYSCTL_SYSDIV_4 | SYSCTL_USE_PLL | SYSCTL_OSC_MAIN | SYSCTL_XTAL_16MHZ);

    - The board doesn't show at all in the device manager, the "USB not recognized" error message appears after connecting to the PC by 30-40 seconds., nothing else.

    - I tried another USB cable, unfortunately no luck.

    Last but not least, would leaving the USB0ID pin unconnected be an issue?, especially I'm trying use the MCU as a device.

    Thanks,

    Karim

  • Hello Karim,

    Karim El-Rayes said:
    - According to the example I'm running on 50 MHz, external crystal is 16 MHz, along with 32.768 KHz hibernation crystal. This is the code for the current clock.

    As long as your external crystal is 16 MHz then yes you'd be running at 50 MHz system clock and the PLL will be at 200 MHz.

    Karim El-Rayes said:
    Last but not least, would leaving the USB0ID pin unconnected be an issue?, especially I'm trying use the MCU as a device.

    No, as long as you use eUSBModeForceDevice that is perfectly fine to do connection wise.

    To take a step back here, have you tested to see if the board is working as expected as a whole? Do you have any LED installed to blink or even a header you can output a signal to in order to make sure the clock comes up correctly and such? When you debug in CCS do you see that the code continues to execute and doesn't handle in a fault ISR or something like that?

    Also have you probed out that the traces for the signals are not shorted and that it connects properly only to the USB pin and not to ground?

  • Hi Ralph,

    That's good to know regarding the clock and USB0ID pin.

    Other peripherals work fine, I have tested the board with timers, GPIO and UART, and all seem to work fine.

    I tried to connect the D+ and D- pins via the GPIO header to USB, still no luck. Probed the traces of the D+ and D- on the receptacle to pins PD5 and PD4, everything seems ok, no shorts. On CCS, no interrupts or faults happen when I run a debugging session for the USB example.

    For what it's worth, I'm using a Tiva C Connected Launchpad (TM4C1294) as my programmer/debugger, it works fine with all examples except the USB.

    Update:
    The USB error message I get the device manager is: "Unknown USB Device (device descriptor request failed)", but it only shows when the Tiva C Connected LP is connected at the same time with the TM4C123G board. Otherwise when I unplug the Tiva C Connected LP from the USB, no action whatsoever occur with the TM4C123G board USB connection, as if it doesn't exist!!, again I enabled some of the TM4C123G GPIO pins in the "usb_dev_serial" example and the MCU seem to work fine. I will keep updating the thread with any developments.

    Thanks,

    Karim

  • Hello Karim,

    Out of curiosity, what is the exact part number of the device you have populated? I want to make sure you did not select one of our TM4C123G devices that does not have a USB peripheral though if that was the case I would have expected your software to then have a fault when you tried to enable it.

    Did you change anything relating to the USB descriptors at all?

    Also you have talked about a EK-TM4C1294XL LaunchPad, do you have the EK-TM4C123GXL LaunchPad as well and could test with that? If the descriptors are kept the same and that LaunchPad works on your PC then I would say the issue is with the USB connection at that point.

    Another thing to check would be if you can get a USB analyzer to see what is being communicated between the PC and the TM4C.

  • Hi Ralph,

    The exact part number is TM4C123GH6PMI. I haven't changed anything in the descriptors, I know that can make a big mess if not done properly.

    Unfortunately I don't have a EK-TM4C123GXL launchpad board to test the USB example with. Speaking of a USB analyzer, I don't have one but I can try to troubleshoot using the oscilloscope, at least to see if the USB pins are transmitting something, hopefully something will come out of it.

    Thanks,

    Karim

  • Hello Karim,

    Okay that may help some to see if traffic is occurring.

    By the way since you see the Device Descriptors Failed with the EK-TM4C1294XL LaunchPad connected, maybe use that to get it to show up in device manage and THEN do a manually driver install of the latest TivaWare USB drivers and see if that works. Maybe Windows is just being dumb about not recognizing it.

  • Hi Ralph,

    Latest developments and troubleshooting efforts:

    - Windows issues the error message without the need for the TM4C1294 LP connected, I probed the D+ and D- lines with an oscilloscope, it seems there is something happening during the enumeration process, yet still Windows can't recognize the the device correctly (screenshot below). Worth noting, the voltage level of the D- was lower than the D+ one.
    - I tried to update the USB driver from the device manager but it didn't go anywhere and Windows issued the "The best drivers for your device are already installed" message!!.

    Here are the screenshots.

    Thanks,

    Karim

      

  • Hello Karim,

    Which Windows Drivers are you pointing towards? The ones from 2.2.0?

    Also from a hardware standpoint, maybe now would be a good time to review the System Design Guidelines USB sections to see if your layout is correct: https://www.ti.com/lit/pdf/spma059

  • Hi Ralph,

    I'm using the USB drivers that comes with TivaWare version 2.1.4.178. It seems my driver is older than the one you are suggesting. Do you know of a direct link to the new USB drivers without the need to install the latest TivaWare?.

    It's possible I missed something or more on the PCB layout, till then nothing is ruled out.

    Thanks,

    Karim

  • Hello Karim,

    Maybe the driver is the issue then!

    The 2.1.4 release had issues with Windows 10 and the USB drivers. We released Patch drivers separately. You need to be using those.

    Here is the download link: http://software-dl.ti.com/tiva-c/SW-TM4C/latest/exports/SW-TM4C-2.1.4.178.PATCH-1.0.zip

    Hopefully that is what is causing your problem!!

  • Hi Ralph,

    Unfortunately the new drivers haven't solved the problem, so I will assume something is wrong in the board design. Let's consider the issue is closed for now until I get a TivaC 123G LP and test with it.

    Thanks for all your efforts troubleshooting the issue with me, really much appreciated.

    Cheers,

    Karim

  • Hi Karim,

    Alright, I'll consider it closed but this thread will stay open for 30 days so if you have updates before it locks, feel free to just reply here.