USB Error Investigation
- Linux, USB
A local company approached us for help determining the cause of a subtle error. Their device was out in the market, and they had updated the hardware with a pin-compatible microprocessor in order to double the clock rate. Everything worked with the exception of USB failures after hours of use. With the previous hardware, the standard USB driver worked without fail, so they had no in-house expertise specific to USB.
In order to analyze the USB failure, we set-up a consistent reproduction scenario that took a few minutes to fail. We discovered the USB, including retries, stopped responding, but didn’t disconnect. Comparing the new hardware with the old, we noticed a difference in frame timing, and traced the issue to a difference in hardware specification. The USB clock was incorrectly set-up.
After discussing the issue with the hardware engineers, they determined a fix for new hardware spins.
Next, we needed to determine a software patch for hardware being used in the field. We reviewed a fix at the application level where, if the USB communication ceased, closing and reopening the application would reestablish a connection. However, we determined the optimal fix was in the USB driver where the connection could be reestablished without the application needing to intervene.
Updated versions of the board have been developed that do not experience the issue. We were able to patch the existing hardware in the field, saving the need for device recall or replacement.