none
USB Device Receiving A Reset While In Use RRS feed

  • Question

  • We have developed a custom device and connect it to the PC via USB 3.0. On the PC side, we're using the standard Microsoft WinUSB driver, and we're able to communicate with the device (via our software). Unfortunately the amount of time that we can communicate successfully is random. In the middle of use, the device would disappear from the Device Manager, and at times it would re-appear. Debugging on the device side, we're getting a USB Reset packet. Out PC side software doesn't have a way of telling WinUSB to generate that (that we know of). Does anyone have suggestions on how to track it down?

    Edit: In our app, we usually fail on a call to WinUsb_ReadPipe at the exact moment that we get the reset on the device side. GetLastError is returning ERROR_GEN_FAILURE.

    Thanks,

    C-Coder


    • Edited by C-Coder Wednesday, December 27, 2017 8:42 PM
    Wednesday, December 27, 2017 7:42 PM

All replies

  • this is most likely a bug with your device at the firmware/PHY layer. you should capture a usb etw trace log ( https://docs.microsoft.com/en-us/windows-hardware/drivers/usbcon/usb-event-tracing-for-windows ) and look at the logs to see why the reset is occurring.


    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Wednesday, December 27, 2017 9:04 PM
  • I've actually tried using Microsoft Message Analyzer and Logman and have not found a way to properly filter out all of the useless and non-related messages. If Microsoft has an updated tutorial on running version 1.4 of MMA on Windows 10, showing how to filter everything out to get only those things related to a specific device, that'd be great. Until then, I'm pretty much in the weeds with that tool.

    Thanks.

    Wednesday, December 27, 2017 9:09 PM
  • The etw log is the primary way of debugging these types of issues. It was worth digging into. I recommend reproducing the issue on a controller that has only your device plugged in.

    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Thursday, December 28, 2017 3:28 PM
  • OK, so I disconnected everything except our device and remoted in to get keyboard and mouse. I notice that with any of our bulk out transfers, the following warning is present:

    Validation\tMissing URB information, releasing dispatch message from endpoint USBCommonGlobals

    And then when the reset comes in, I see this in the trace:

    Application\tUSB: Transfer failed with status pair status pair USBD_STATUS_XACT_ERROR and STATUS_UNSUCCESSFUL

    Any suggestions?

    Thanks,

    C-Coder

    Thursday, December 28, 2017 5:10 PM
  • We've added some more grounding and so far it looks good. Obviously we still need to do some more testing, and will report back if we still have an issue.

    Thanks,

    C-Coder

    Friday, December 29, 2017 4:09 PM