Author Topic: Device Does Not Resume After Suspend  (Read 10143 times)

nobbyv

  • Member
  • ***
  • Posts: 14
Device Does Not Resume After Suspend
« 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.

« Last Edit: January 23, 2014, 03:08:46 am by nobbyv »

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Device Does Not Resume After Suspend
« Reply #1 on: January 23, 2014, 09:19:42 am »
The chip's reference manual has information about Suspend and resume. I would start there.

Barry Twycross

  • Frequent Contributor
  • ****
  • Posts: 263
Re: Device Does Not Resume After Suspend
« Reply #2 on: January 23, 2014, 02:09:14 pm »
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.

FWD

  • Member
  • ***
  • Posts: 6
Re: Device Does Not Resume After Suspend
« Reply #3 on: January 26, 2014, 09:54:21 am »
You need to do more tests to locate the issue