Re: WinUSB resume

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



It sounds like you aren't using UMDF at all, so the host automatic host restart would not be a part of the picture. Conceptually there are two types of stacks you could use WinUSB 1) WinUSB->UMDF framework->Your UMDF Driver Code or 2) WinUSB->Your user-mode service/application. In the second case which it seems like you are using, UMDF is not involved.

I'm not really an expert in USB/WinUSB so I'm not sure what the issue is. I'll leave it to one of the more knowledgeable people to chime in here.

"Dean" <Dean@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:B8AA42B5-1E32-4C09-8EC1-C4608E201720@xxxxxxxxxxxxxxxx
Hi, again. I do more test. If I add a 1.5K resistance between power and
ground, I monitor the resume work fine. WinUSB driver won't restart my usb
device anymore.

Resistance current in suspend mode resume from suspend
0K 254uA fail
1K 6mA OK

1.5K 3.6mA OK
1.6K 2.6mA fail
2K 2.2mA fail

I don't know why, can anyone explain?



"Dean" wrote:

Thank you very much. I'm using WinUSB as my usb device driver only, I don't
write any driver source code. I'm afraid there is a bug in WinUSB's resume
path that caused a crash in the host process. Can you teach me how to debug
WinUSB?

I'd better describe more about my test.
Platform:
Windows Vista sp2, WinDDK 7600.16385.0, Intel Core2 Duo CPU E8300, 4GB RAM,
32 bit operating system.

WinUSB settings:
HKR,,"SystemWakeEnabled",0x00010001,1
HKR,,"DeviceIdleEnabled",0x00010001,1
HKR,,"DeviceIdleIgnoreWakeEnable",0x00010001,1
HKR,,"UserSetDeviceIdleEnabled",0x00010001,1
HKR,,"DefaultIdleState",0x00010001,0x1
HKR,,"DefaultIdleTimeout",0x00010001,2000

Scenario:
Plug in a usb device to my PC, I monitor the current of the usb device is
25mA. More than 2 seconds later, the usb device selective suspend, the
current is power down to 254uA. I try a bulk transfer command
WinUsb_ReadPipe(), the usb device has been detached and attached
automatically. I can hear
Windows new device arrival notification sound, it appear as a restart to the
end user.



"Brandon Wilson [MSFT]" wrote:

> UMDF has a feature where if the user-mode driver crashes, it will
> automatically restart the device and re-load the the driver. If there > was a
> bug in your driver's resume path that caused a crash in the host > process,
> framework would automatically recover and it would just appear as a > restart
> to the end user. USB resume is supported in UMDF/WinUSB so it is > likely
> that the host process is crashing and automatically being restarted.
>
> If a debugger is attached to the host process, the crash should be > caught
> there so you can debug further. The WdfVerifier tool in the Win7 WDK
> provides a nice GUI interface to configure all the necessary values for
> debugging.

.



Relevant Pages

  • Re: USB Mass Storage Device
    ... I was able to see the target as a USB device on the host PC. ... Marco Contenti wrote: ... Did you modify ISP1582 driver provided by the philips. ... The USB device is slave and can only answer requests from the host. ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Biztalk slow to receive files after host instance restart
    ... Especially when you use the default BizTalk host configuration because the host is than also responsible for moving tracking information from msgbox db to tracking db. ... Give the SQL jobs some time to process the backlog and after that see if the host restart time gets better. ...
    (microsoft.public.biztalk.general)
  • Re: Biztalk slow to receive files after host instance restart
    ... Backup Biztalk Server ... On closer inspection the T-SQL statements that ran these jobs needed ... Especially when you use the default BizTalk host configuration ... host restart time gets better. ...
    (microsoft.public.biztalk.general)
  • Re: WinUSB resume
    ... UMDF has a feature where if the user-mode driver crashes, it will automatically restart the device and re-load the the driver. ... If there was a bug in your driver's resume path that caused a crash in the host process, framework would automatically recover and it would just appear as a restart to the end user. ... I prefer to say my USB device has been reset. ...
    (microsoft.public.development.device.drivers)
  • Re: WinUSB resume
    ... WinUSB driver won't restart my usb ... Plug in a usb device to my PC, I monitor the current of the usb device is ... Windows new device arrival notification sound, it appear as a restart to the ...
    (microsoft.public.development.device.drivers)