FX3 device stops working after PC restart

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

cross mob
Anonymous
Not applicable

 Hello,

   

If I restart my PC running Windows 8.0 my FX3 device no longer works (power to it remains on). After the restart the USB vendor ID is 0 and the product ID is 0x20, both of which aren't what they were before the restart. Further attempts to connect to it by creating a fresh CCyUSBDevice object produce different IDs each time.

   

Upon power-on the device is initialized by uploading to its FPGA, which changes its USB product ID. Still, power has not been removed during the restart so it should still be in the state it was before, unless the restart is doing something to it.

   

How can I make it continue to work after a restart?

   
        
0 Likes
8 Replies
Anonymous
Not applicable

 Hi,

   

Which host controller are you using?

   

Did you try with any other host controller in addition to the PC which you use currently?

   

Regards,

   

- Madhu Sudhan

0 Likes
Anonymous
Not applicable

I've tried it on two PCs, one running Windows 8 and the other Windows 7. In both cases the USB controller that appears/disappears in Device Manager when the device is powered on/off is:

   

 

   

Cypress USB StreamerExample

   

 

   

In Windows 7 after the restart the controller is still there but not working. Under its properties it says:

   

 

   

"The device cannot start (code 10)"

   

 

   

Under Windows 8 the controller is also still there and Device Manager says it's working. However, there is a 28-second delay on each attempt to connect to it (perhaps when the CCyUSBDevice object is instantiated, but I haven't investigated that). On the Windows 7 PC there is no delay attempting to connect, but both PCs return varying vendor and product IDs (starting with 0x0, 0x20) on successive attempts.

   
        
0 Likes
Anonymous
Not applicable

I've been told by a colleague that I was supposed to give the hardware instead.

   

Windows 7 PC: Intel(R) USB 3.0 eXtensible Host Controller

   

Windows 8 PC: Intel(R) USB 3.0 eXtensible Host Controller  - 100 (Microsoft)

   

In both cases I don't think the device is really using USB 3.0, however, because on Win 7 I get a message on connection that it could operate faster, and on Win 8 I'm using an extension cable that's not USB 3.0. (For my purposes it's fast enough at high speed rather than super speed).

0 Likes
Anonymous
Not applicable

Something else I just noticed is that on the Win 8 PC, USB viewer apps show the correct vendor and product IDs after the restart, but in my own code members VendorID and ProductID of a newly created CCyUSBDevice are wrong (after a 28-second delay). I'm thinking now that those members simply haven't been initialized because it couldn't make the connection.

0 Likes
Anonymous
Not applicable

I don't know if this is useful at all, but I ran the freeware USB viewer USBDeview.exe. Before the restart with the device working the device name and description are given as:

   

FX3 Cypress USB StreamerExample

   

 

   

But after the restart they are:

   

Port_#0003.Hub_#0003 Cypress USB StreamerExample

   

There was also a pop-up message in Windows soon after the restart saying that the device is not working.

0 Likes
Anonymous
Not applicable

 When your PC restarts the USB port also resets. And while your PC is booting, with your device plugged in, the USB port resets but your device remains in the same state it was before restarting; now at this point your PC runs the initial program for your device but since your device is in some other state it will not recognize the instructions given by your PC thus the malfunction in your device.

   

 

   

Regards,

   

Deniz

   

http://blog.7pcb.com

0 Likes
Anonymous
Not applicable

Thanks for the response.

   

 

   

When you say "some other state", are you referring to the upload that makes it look like a different device from its power-up state? I tried restarting without doing anything to the device first, but it didn't make any difference. The sequence was:

   

1. With PC booted, connect the device with its power off.

   

2. Turn on the device; on enquiry it is recognized as a high-speed device.

   

3. Restart the PC; Windows pops up "USB device not recognised" and the device cannot be used.

   

 

   

Whatever initialization was done by Windows at step 2 worked, but it didn't work after the restart with the device in the same state.

0 Likes
Anonymous
Not applicable

I'm resurrecting this from 2015 because the device still has the same problem and I'd like to get it fixed. It also fails to work after the USB cable has been unplugged and re-plugged, so I'll concentrate on that here (saves re-booting for every test). I've now run Device Monitoring Studio. It gives a mass of information but I don't know if any of it is useful. I know very little about USB so I'm just guessing what to post.

   

When I connect the device after power-on, the monitor has in its structure view:

   

0    device_connected    { nLength=154; data="\\??\\USB#VID_04B4&PID_00F3#0000000004BE#{a6782bce-4376-4de2-8096-70aa9e8fed19}" }    0x00000000    156    pstring_w    2017-04-05 

   

 

   

Following upload of the FPGA code device 0xF3 disconnects and 0xF1 connects

   

0    device_connected    { nLength=160; data="\\??\\USB#VID_04B4&PID_00F1#5&13a74b18&0&14#{a6782bce-4376-4de2-8096-70aa9e8fed19}" }    0x00000000    162    pstring_w  2017-04-05 09:11:55.1649034    unknown (0)

   

At this point I can use the device and all is okay, but when I unplug and replug I get:

   

0    device_connected    { nLength=160; data="\\??\\USB#VID_04B4&PID_00F1#5&13a74b18&0&14#{a6782bce-4376-4de2-8096-70aa9e8fed19}" }    0x00000000    162    pstring_w    2017-04-05 09:22:52.9692638    unknown (0)

   

(on another view) 000000: Descriptor parsing failed.  (UP), 2017-04-05 09:22:52.9692638

   

And Windows says:
“The last USB device you connected to this computer malfunctioned, and Windows does not recognize it.”

   

If that string of data is the descriptor (the matching time-stamp on the error message suggests it is), it is the same descriptor as when it worked. Any suggestions as to what is wrong?

0 Likes