• AVR Freaks

USBSER.SYS blue screen

Page: 12 > Showing page 1 of 2
Author
dtran11
Super Member
  • Total Posts : 244
  • Reward points : 0
  • Joined: 2009/10/20 08:33:03
  • Location: 0
  • Status: offline
2010/01/07 12:48:30 (permalink)
0

USBSER.SYS blue screen

I used the CDC example code from Microchip on a PIC32 and am getting
random blue screens on XP sp3. The blue screen error points to the USBSER driver.
It only happens to some machines and not others. All running XP sp3.
Has anyone had this problem with their usb device?

Thanks.
#1

25 Replies Related Threads

    dtran11
    Super Member
    • Total Posts : 244
    • Reward points : 0
    • Joined: 2009/10/20 08:33:03
    • Location: 0
    • Status: offline
    RE: USBSER.SYS blue screen 2010/01/20 22:19:12 (permalink)
    0
    Any clue???
    #2
    xiaofan
    Super Member
    • Total Posts : 6247
    • Reward points : 0
    • Joined: 2005/04/14 07:05:25
    • Location: Singapore
    • Status: offline
    RE: USBSER.SYS blue screen 2010/01/21 07:25:03 (permalink)
    0
    The best solution may be to forget about usbser.sys which is certainly not the best driver in the world. The other thing is that to try it with different OS (XP SP2, Vista and Wndows 7) to see if it is specific to the Windows XP SP3. 

      USB_Links and libusb
    #3
    dtran11
    Super Member
    • Total Posts : 244
    • Reward points : 0
    • Joined: 2009/10/20 08:33:03
    • Location: 0
    • Status: offline
    RE: USBSER.SYS blue screen 2010/01/21 12:59:37 (permalink)
    0
    Do you know of an alternative CDC driver other than usbser? I searched on google and found
    something called bulkusb.sys but I can't find the file anywhere.
    #4
    xiaofan
    Super Member
    • Total Posts : 6247
    • Reward points : 0
    • Joined: 2005/04/14 07:05:25
    • Location: Singapore
    • Status: offline
    RE: USBSER.SYS blue screen 2010/01/21 18:18:15 (permalink)
    0
    Unfortunately the only Windows built-in driver for CDC-ACM USB Serial Port emulation is usbser.sys. Linux seems to have better support for CDC-ACM device.

    bulkusb is an example driver from Microsoft DDK/WDK. It is for use with generic USB device using bulk transfer. You can just use the Microchip custom driver.

    The other idea is to use HID to replace CDC.

      USB_Links and libusb
    #5
    dtran11
    Super Member
    • Total Posts : 244
    • Reward points : 0
    • Joined: 2009/10/20 08:33:03
    • Location: 0
    • Status: offline
    RE: USBSER.SYS blue screen 2010/01/26 12:11:19 (permalink)
    0
    Do you know of any CDC implementations using the microchip custom driver?
    Thanks.
    #6
    xiaofan
    Super Member
    • Total Posts : 6247
    • Reward points : 0
    • Joined: 2005/04/14 07:05:25
    • Location: Singapore
    • Status: offline
    RE: USBSER.SYS blue screen 2010/01/26 16:23:14 (permalink)
    0
    The custom driver is not for CDC. If you want to get a virtual serial port, then you have to use a driver which gets you there. The Microchip custom driver will not get you a virtual serial port.

      USB_Links and libusb
    #7
    dtran11
    Super Member
    • Total Posts : 244
    • Reward points : 0
    • Joined: 2009/10/20 08:33:03
    • Location: 0
    • Status: offline
    RE: USBSER.SYS blue screen 2010/01/27 17:23:52 (permalink)
    0
    I did some tests with my device and it seems like the blue screen
    only occurs when the pc is under a lot of stress for a long period of
    time (over 2 hours). Just wanted to document this stuff in case someone has the same
    issue.

    Thanks.
    #8
    xiaofan
    Super Member
    • Total Posts : 6247
    • Reward points : 0
    • Joined: 2005/04/14 07:05:25
    • Location: Singapore
    • Status: offline
    RE: USBSER.SYS blue screen 2010/01/27 18:55:07 (permalink)
    0
    Interesting. Does this happen for other OS (XP SP2, Vista SP1/SP2, Windows 7)?

      USB_Links and libusb
    #9
    dtran11
    Super Member
    • Total Posts : 244
    • Reward points : 0
    • Joined: 2009/10/20 08:33:03
    • Location: 0
    • Status: offline
    RE: USBSER.SYS blue screen 2010/01/27 18:58:23 (permalink)
    0
    Have only tested it with xp sp3. I have tested with 7 different xp sp3 machines
    so far and half seem to be immune to the bsod, the other half when put
    under stress gives the bsod.
    #10
    xiaofan
    Super Member
    • Total Posts : 6247
    • Reward points : 0
    • Joined: 2005/04/14 07:05:25
    • Location: Singapore
    • Status: offline
    RE: USBSER.SYS blue screen 2010/01/27 23:56:49 (permalink)
    0
    usbser.sys is likely the culprit. But you host application can play a part as well.

    Example: the host app only works with SP2's usbser.sys and not SP3's usbser.sys
    http://groups.google.com/group/avnet-spartan-3a-eval-kit/browse_thread/thread/9755707f3f743029?pli=1

    Windows XP SP3 supposedly solves one issue with SP2's usbser.sys so that we can use IAD to have USB composite device with one or more CDC interface.

    918365  (http://support.microsoft.com/kb/918365/ ) The Usbser.sys driver may not load when a USB device uses an IAD to define a function that has multiple interfaces, and this function uses the Usbser.sys driver file in Windows XP


      USB_Links and libusb
    #11
    dtran11
    Super Member
    • Total Posts : 244
    • Reward points : 0
    • Joined: 2009/10/20 08:33:03
    • Location: 0
    • Status: offline
    RE: USBSER.SYS blue screen 2010/01/28 23:19:50 (permalink)
    0
    Thanks xiao you are a lifesaver. Going back to sp2's usbser
    fixed the bsod issue. Now I can sleep.
    #12
    xiaofan
    Super Member
    • Total Posts : 6247
    • Reward points : 0
    • Joined: 2005/04/14 07:05:25
    • Location: Singapore
    • Status: offline
    RE: USBSER.SYS blue screen 2010/01/28 23:57:13 (permalink)
    0
    ORIGINAL: dtran11
    Thanks xiao you are a lifesaver. Going back to sp2's usbser
    fixed the bsod issue. Now I can sleep.


    Have a good sleep. grin I am glad to be of some help to you. To be honest, I am just guessing the problems and use Google to find related links.

    This is quite interesting. I am thinking the host program plays a part. Are you using certain special serial components for your host program?

      USB_Links and libusb
    #13
    dtran11
    Super Member
    • Total Posts : 244
    • Reward points : 0
    • Joined: 2009/10/20 08:33:03
    • Location: 0
    • Status: offline
    RE: USBSER.SYS blue screen 2010/01/29 12:00:38 (permalink)
    0
    Nothing really special in my host program. Just using these main functions for com port calls:

    (code in C with VS2005)

    CreateFile
    ReadFile
    WriteFile
    CloseHandle
    #14
    xiaofan
    Super Member
    • Total Posts : 6247
    • Reward points : 0
    • Joined: 2005/04/14 07:05:25
    • Location: Singapore
    • Status: offline
    RE: USBSER.SYS blue screen 2010/01/29 18:00:54 (permalink)
    0
    Thanks. usbser.sys is really problematic. [:@]

      USB_Links and libusb
    #15
    dtran11
    Super Member
    • Total Posts : 244
    • Reward points : 0
    • Joined: 2009/10/20 08:33:03
    • Location: 0
    • Status: offline
    RE: USBSER.SYS blue screen 2010/02/03 06:18:04 (permalink)
    0
    I spoke too soon. I am still getting the bsod with sp2 version of usbser. However, it is more
    stable than sp3 version. Sometimes the device runs all night, other times it can die within
    3 hours. This is better than the sp3 version which always dies below 4 hours.

    As you say xiao, usbser is really problematic.
    #16
    dtran11
    Super Member
    • Total Posts : 244
    • Reward points : 0
    • Joined: 2009/10/20 08:33:03
    • Location: 0
    • Status: offline
    RE: USBSER.SYS blue screen 2010/03/24 17:39:20 (permalink)
    0
    Just to update:

    I am running Windows 7 32bit and the blue screen is even worse than XP.

    I currently have two versions of the PC application, one is in C# and haven't
    had a bluescreen yet. The other is in C using 'CreateFile', 'CloseHandle', etc..
    to control the COM port.

    The C version I am getting blue screens with. Should I be using different functions
    for controlling the COM port in C other than the ones I mentioned?

    Thanks.
    #17
    xiaofan
    Super Member
    • Total Posts : 6247
    • Reward points : 0
    • Joined: 2005/04/14 07:05:25
    • Location: Singapore
    • Status: offline
    RE: USBSER.SYS blue screen 2010/03/24 18:34:19 (permalink)
    0
    I assume you are using the usbser.sys under Windows 7. I also assume you are using the DotNet serial component from Visual Stuido. If that is true, which dotnet serial components are you using (from VS2008 or VS2005?)?

    If possible, could you post your DotNet test program (using DotNet Serial Components) and the C based program (using Windows API)?

    Not so sure if PortMon can help in this case.

      USB_Links and libusb
    #18
    dtran11
    Super Member
    • Total Posts : 244
    • Reward points : 0
    • Joined: 2009/10/20 08:33:03
    • Location: 0
    • Status: offline
    RE: USBSER.SYS blue screen 2010/03/24 18:39:50 (permalink)
    0
    We are using VS2005. I would love to post the code but it is
    not mine.

    Thanks for suggesting PortMon. I will give it a try.
    #19
    xiaofan
    Super Member
    • Total Posts : 6247
    • Reward points : 0
    • Joined: 2005/04/14 07:05:25
    • Location: Singapore
    • Status: offline
    RE: USBSER.SYS blue screen 2010/03/24 22:09:52 (permalink)
    0
    ORIGINAL: dtran11
    We are using VS2005. I would love to post the code but it is not mine.


    You do not need to post the whole program, but rather you would try to create a mini test case which generate the BSOD. In that case, some experts may be help you better.



      USB_Links and libusb
    #20
    Page: 12 > Showing page 1 of 2
    Jump to:
    © 2020 APG vNext Commercial Version 4.5