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.

F28x USB device fails to respond to GetConfigurationDescriptor request after a SetConfiguration - how to debug TI USB code?

Other Parts Discussed in Thread: CONTROLSUITE

Hello and apologies if the answer to this question is "Read The Manual" -- I'm happy to do so if I can be pointed to the right reading material.

My problem is that I'm maintaining a family of USB devices based on various Piccolo processors, which use some custom code on top of c.2010-era TI USB code.

Things basically work but there is one error which I'm having trouble debugging.  I'm running the USBIF's USB Command Verifier app, and it reports the following failure:

ERROR: Get Configuration failed
(1.1.2) Devices must support being set to Addressed/Configured state.
Here is the output of a USB bus analyzer when the failure happens:

What you can see here is that the first GetDescriptor(Configuration) prompts a valid reply from the device.

Then there is a SetConfiguration(1) followed by another GetDescriptor(Configuration)... there is no reply to the second GetDescriptor(Configuration).

Now the part that is making this difficult for me is that it seems that the GetDescriptor handling is happening entirely within the TI USB layer, it's never hitting my own code.  When I initialize the USB device, I hook in a pointer to my own defined GetDescriptor handler, exactly according to the TI examples (for tDeviceInfo->tCustomHandlers) as far as I can tell.  However, this custom handler is never being called.  I am not sure where to look for the TI code which is actually running in response to the host's GetDescriptor request.  Any advice on where to look or how to begin debugging this problem would be greatly appreciated.

Thanks!

Amos Gaynes

  • Hi Amos,

    Are you using F2806x? Is your MCU acting as a Host or Device? What is the host and what is the device?

    Please initialize .ebss section to 0x0000.
    .ebss : fill = 0x0000 {} > RAML6, PAGE = 1

    Let me know if this helps at all. I may have run into a similar problem recently. We are releasing an updated usblib for F2806x with some bug fixes and we have aligned it with the F2837x usblib. It will released on June 19, 2015.

    Best Regards,
    sal
  • Hi Sal, and thanks for your reply!  The product I am working on at the moment is running an F28069.  The MCU is acting as a USB Device, and the problem seems mainly to be when the host is a Windows 7 PC (although it may be that the GetDescriptor problem always happens and other hosts are more tolerant).

    The product is an analog synthesizer (musical instrument); it's using USB for MIDI communication (USB MIDI 1.0 specification, MidiStreaming device).

    I'll try initializing .ebss as suggested, and report back if it makes any change to the behaviour.  Looking forward to any library updates.

    Kind regards,

    Amos

  • update: edited the CMD file to initialize .ebss to zero, as suggested [.ebss : fill = 0x0000 {} > RAML6, PAGE = 1].

    On a sample of one unit / one host PC, it worked! :) The USB driver on the host was previously failing to run (Windows error code 10, driver cannot start) due to this enumeration problem with the device... device now enumerates, driver on the host now runs.

    Still need to run the USB Command Verifier on a couple of systems to be more certain, but this is starting to look like a successful fix.
  • USB Command Verifier still fails; my device doesn't reply to GetDescriptor(Configuration) for configuration 0. I am pretty sure all my USB descriptors are correct. Still interested in how I might debug; is it possible to break or trap on the MWARE code that is handling the GetDescriptor request?
  • Amos,

    Yes it is possible. You will need at Add the file which you want to debug and step through to your project. Right click on the project in Project Explorer and click Add Files.

    The file you are specifically referring to is usbdenum.c in the usblib. Add this to the project and then you begin to set breakpoints and debug the code.

    sal
  • Hi Sal, would you be so kind as to post a link to the updated usblib for F2806x on this thread?  It will be convenient for me, and also I suspect for future readers of this thread.  Thanks!

    -Amos

  • We just released it today in controlSUITE. Run the controlSUITE.exe in the root directory of controlSUITE to look for an update and install the update.

    The latest release of /device_support/f2806x will have the latest update to usblib, usb.c, and examples.

    sal