Cyusb/cyusb3 driver crash blue screen on Windows 10 with PSOC1

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
mihuc_4257591
Level 1
Level 1

Hi Folks,

Our PSOC1 based device has been using the cyusb.sys driver for years under Windows 7 without an issue.  Our customers are increasingly building systems around Windows 10, but cyusb.sys (3.4.6) caused blue screen crashes upon hot-plug insertion of the device into the PC under Windows 10.

We switched to cyusb3.sys (1.2.3.20).  The frequency of the failure reduced somewhat, but it still causes a blue screen crash on hot-plug insert.  I can cause it to happen about once every 15 plug insertions.  There's no other software involved other than the driver on the PC side.

As long as the system survives hot-plug insert, everything always works fine.

I have one Windows crash dump and debug analysis for cyusb.sys, which points to the driver itself, and provides a stack trace (though I don't have symbols for cyusb.sys, so the functions are just memory addresses in the debug log.)

For cyusb3.sys I have six crash dumps and debug files, but unfortunately they all point to general memory corruption which cause random executables and drivers to crash, so none of them have a stack trace within cyusb3.sys.

I see one post in the community that describes a similar issue, but doesn't reach a public conclusion here:

https://community.cypress.com/message/179309#179309

Any advice or help would be appreciated.

Thanks,

Mike

0 Likes
1 Solution

Hi Folks,

I've continued debugging and I've learned something very interesting.

The original cyusb.sys driver does have some kind of blue screen crash problem under hot-plug conditions, however, cyusb3.sys apparently does not.  There is a Windows 10 behavior (bug?) that may fool people into thinking it does.

In my system, originally I had uninstalled the cyusb.sys driver, and installed the cyusb3.sys driver.  You can query windows using this command (in an admin privileged command prompt) to find out what drivers are installed, and what .inf files they are using:

dism /online /get-drivers /format:table > c:\drivers.txt

On my system, there were no references to cyusb.sys, and two references to cyusb3.sys (one for my device, and one for miniprog3.)

But, if you look at the crash logs that I posted above, down in the listing of processes running in memory, the driver listed was cyusb.sys in all cases where the system crashed.

I plugged my device in to the system several times and sure enough, at random intervals the driver that was started was cyusb.sys, not cyusb3.sys.  The OS was getting confused about which driver to start.  When it starts cyusb.sys, there is a chance of a blue screen from that binary.

I went on to exorcise the ghosts and demons from the operating system using brute force methods:

1. I went to Device Manager and set "View->Show Hidden Devices" to checked.  There were several entries present for my device.  I removed each of them by right clicking and uninstalling them from the system.

2. I used the following command to remove each of the installed Cypress drivers from the system (using the admin privileged command prompt again.)

pnputil.exe -d oemxxx.inf

Where the xxx is the number of the inf file from the dism command above for the driver I wanted to remove.

3. I manually entered the c:\Windows\System32\drivers\ folder and removed both cyusb.sys and cyusb3.sys

4. I then performed a reinstall of the cyusb3.sys driver.

After a couple hundred hot-plug cycles, no crashes.

So I don't think there's anything for the Cypress' folks to look into since it appears to be a cyusb.sys driver problem only.

Thanks Sampath and Srinath for taking the time to look at this.

Mike

View solution in original post

0 Likes
6 Replies
SampathS_11
Moderator
Moderator
Moderator
250 sign-ins 250 solutions authored 5 questions asked

Hi Mike,

Is it possible that tests be conducted using Cypress provided host applications? Would it be possible for you to share your application code? And share the .DMP (dump) file?

Best regards,

Sampath Selvaraj

0 Likes
lock attach
Attachments are accessible only for community members.

Hi Sampath,

There aren't any applications involved, it's just windows 10 detecting the USB device and starting the cyusb.sys/cyusb3.sys driver.  I'd be happy to share the dump files.  I'm having a little trouble getting things to post.  Here are the debug output logs from the dump files.  I'll try adding the .dmp files in additional posts after this.

Mike

0 Likes

Sampath - The dump files are just too big and the upload to the community keeps timing out.  Is there another way I can get them to you?

0 Likes

Hello Mike,

I am extremely sorry for this inconvenience. Can you kindly share to us using a link?

Best regards,

Sampath Selvaraj

0 Likes

Hello,

- Please share the .DMP file through a drive link.

- Have you tried uninstalling the CYUSB.SYS driver and installing the latest version (1.2.3.20) CYUSB3.SYS driver?

Best regards,

Srinath S

0 Likes

Hi Folks,

I've continued debugging and I've learned something very interesting.

The original cyusb.sys driver does have some kind of blue screen crash problem under hot-plug conditions, however, cyusb3.sys apparently does not.  There is a Windows 10 behavior (bug?) that may fool people into thinking it does.

In my system, originally I had uninstalled the cyusb.sys driver, and installed the cyusb3.sys driver.  You can query windows using this command (in an admin privileged command prompt) to find out what drivers are installed, and what .inf files they are using:

dism /online /get-drivers /format:table > c:\drivers.txt

On my system, there were no references to cyusb.sys, and two references to cyusb3.sys (one for my device, and one for miniprog3.)

But, if you look at the crash logs that I posted above, down in the listing of processes running in memory, the driver listed was cyusb.sys in all cases where the system crashed.

I plugged my device in to the system several times and sure enough, at random intervals the driver that was started was cyusb.sys, not cyusb3.sys.  The OS was getting confused about which driver to start.  When it starts cyusb.sys, there is a chance of a blue screen from that binary.

I went on to exorcise the ghosts and demons from the operating system using brute force methods:

1. I went to Device Manager and set "View->Show Hidden Devices" to checked.  There were several entries present for my device.  I removed each of them by right clicking and uninstalling them from the system.

2. I used the following command to remove each of the installed Cypress drivers from the system (using the admin privileged command prompt again.)

pnputil.exe -d oemxxx.inf

Where the xxx is the number of the inf file from the dism command above for the driver I wanted to remove.

3. I manually entered the c:\Windows\System32\drivers\ folder and removed both cyusb.sys and cyusb3.sys

4. I then performed a reinstall of the cyusb3.sys driver.

After a couple hundred hot-plug cycles, no crashes.

So I don't think there's anything for the Cypress' folks to look into since it appears to be a cyusb.sys driver problem only.

Thanks Sampath and Srinath for taking the time to look at this.

Mike

0 Likes