2016-04-18 02:48 AM
Hi,
since Windows 8 and 10 I have Problems with my USB HID.I'm using the STM USB HID Stack and the demo VB project from JANAXELSON.COM.If I connect the STM32F407 via USB the connection works for ~1sec. Afterwards the USB_HID_STATUS changes from USB_HID_CONNECTED to USB_HID_DETACHED.Workaround (not practically) is to change the variables in the registry from 1 to 0:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USBAllowIdleIrpInD3 = 0DeviceSelectiveSuspended = 0EnhancedPowerManagementEnabled = 0SelectiveSuspendEnabled = 0In Windows (Printers and Devices) the device is correct registered, but in a kind of suspend mode. If I start the software before I plugg the USB cable,the Software recognizes this and connects to STM32F4. Afterwards the deviceremains 'online' and do not go to the suspend mode.I'm looking for a solution either on PC side, or on the STM32F4 USB stack:PC Side (Preferred, I'm using Visual Studio Express 2015 - VB.Net)Are there functions that checks the power state of the USB HID and somehow 'wake up'the device before writing/reading via fileStreamdevicedata?Or, to deactivate the USB Selective Suspend for this device (not all USB devices) to avoid the device to suspend.USB StackCan the desciptors be changed to avoid Windows 8/8.1/10 to set the deviceinto other mode than D0 (eg. D3 DeviceSelectiveSuspended). #hid-usb-selective-suspend