PORTS Forum
Ports and Interfaces => USB => Topic started by: nobbyv on January 23, 2014, 03:05:31 am
-
As part of design qualification, an integrator using our HID device runs it on a test program that suspends (S3)/resumes the device over and over. Our device, based on a STMicro STM32F105 and using their supplied USB libraries, intermittently does not come back from suspend (the average occurrence of this failure is every 200-300 loops). The host tries to reset the device, but the device never responds.
I am just learning USB myself (with the help of USB Complete Fourth Edition) and would appreciate any advice on where to look. I have captured the USB traffic using a TP Beagle, but it simply looks as if the device enters suspend, after X time (5 seconds) the host tries to resume it, but it never replies. I have posted a screenshot of the end of the capture.
(http://i44.tinypic.com/jac0gx.png)
-
The chip's reference manual has information about Suspend and resume. I would start there.
-
Your trace doesn't show any attempt by the host to access the device. Do you have NAKs turned off? I'd confirm that the host is actually attempting to access the device.
If there are hidden NAKs, my guess would be that the device has crashed. What debugging facilities do you have to probe this. First question is the device alive during the suspend. Second, does it have interrupts turned on, does it have the correct interrupts turned on. Usually a device will be interrupted for a resume, or a reset.
-
You need to do more tests to locate the issue