USB CDC issues with Windows 10

Go To Last Post
6 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm having some problems with a USB CDC device under Windows 10, using the ASF 3.31.

 

It seems like the new usbser.sys drive is quite aggressive at suspending the device. Even if you disable selective suspend for USB, it does something that causes apps to crash and the device to send/receive odd characters. For example, if I open the virtual COM port in Putty, it becomes unstable if the Putty window loses focus!

 

Apparently usbser.sys has been rewritten for Windows 10 and there is even an entire new API for it, but of course apps that need to support Windows 8 and below can't rely on that. I have my own app which uses standard CreateFile() calls to access the port, which I guess is probably what most apps do (I tried Putty and HyperTerminal too). My device is not getting USB_SUSPEND callbacks, and I can see with a scope that the USB clock doesn't go away. It's something in the driver...

 

Has anyone else experienced this?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Is your Hardware is okay?

 

 

শূন্য  - The ZeRo

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

mojo-chan wrote:
It's something in the driver...
Is there a DLL that interfaces with the SYS (driver)?

Reason : Atmel Studio 7 added Windows 10 and a new version of Jungo; Jungo DriverCore (PC USB Drivers) has multiple USB CDC classes.

http://www.jungo.com/st/support/windriver/wdver/ (Version 12.0.0 ... Windows: Added support for the Windows 10 public release.)

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 

 

I don't have putty.  I do have Atmel's driver because I installed Studio.   I tried hyperterm and I notice one difference between Win10 and Win7. 

 

If I hit Call > Disconnect after using it on Win 7, and type something into Hyperterm, it will automatically re-connect and everything works fine.

 

If I hit Call > Disconnect on Win10 after using it, I can send once more and get a reply, and Call shows it connected, but if I try sending again, Hyperterm hangs and I need to kill it with a 2x4.

 

Then I installed Microsoft's Usb serial device driver, which was there before I installed Studio.  Now it works just like Win 7.  No hangs. 

 

To go back to Microsoft's driver, I right clicked and hit Disable.  I don't know if that is necessary.  Then I right clicked and hit Update Driver software.  Then Browse my computer... > Let me pick... > Usb Serial Device.

 

Last Edited: Tue. May 24, 2016 - 07:16 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks for the suggestions guy. The hardware is fine, it works perfectly on Windows 8.1 and below. The software works fine there too.

 

I did some research. Microsoft re-wrote the USB CDC driver (usbser.sys) for Windows 10. It's better now, it can handle things like surprise disconnects much like the FTDI driver can, but it also seems to be causing some problems with my Windows software. Like steve17, I have noticed that most apps seem to behave differently on Windows 10 when using USB CDC devices. I'm waiting for IT to supply me with a laptop that can run Visual Studio so I can debug it.

 

Steve, I'll try downgrading to the other driver, if that fixes it then maybe I can edit the .inf file to specify that version. Well done for finding that.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have fixed my issues now. The API in Windows 10 works a little differently, even though the functions are the same, and the timing between the serial port and the rest of the USB stack is different. For example, API functions that would accept a null pointer for stuff you weren't interested in now crash, so you have to create a temp variable just to pass in. When disconnecting the device the serial port read fails before the device management API sends a disconnect message, so you have to wait some milliseconds for that message before considering it a real error.