Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > USB Controllers > Reconnection of self-powered device

Bookmark and Share
Cypress Developer CommunityTM
Forums | Videos | Blogs | Training | Rewards Program | Community Components



Reconnection of self-powered device
Moderator:
RSKV

Post Reply
Follow this topic



Reconnection of self-powered device

Deni posted on 17 Jul 2012 3:38 AM PST
Member
6 Forum Posts

I have self-powered USB device running on FX2. Everything works except reconnection after USB cable is plugged out. When I plug-in the cable, device is not recognized on the host side and I have to power it down and up again to get it working.

I have implemented VBUS monitoring so device controls DISCONNECT bit. Except for that, what else should be done on the device side when "disconnected" and "connected" conditions are detected? 

Help, anyone?




Re: Reconnection of self-powered device

PRJI posted on 18 Jul 2012 10:23 PM PST
Cypress Employee
333 Forum Posts

 Hi,

  Is it possible to upload your schematic here???

Thanks

Prajith



Re: Reconnection of self-powered device

aasi posted on 19 Jul 2012 07:57 AM PST
Cypress Employee
1090 Forum Posts

Is your firmware based on the firmware frameworks?

What other things are doing when disconnect is recognized using the VBUS monitoring?

Are you doing a software reset anywhere in your firmware? What is the VID/PID and the error code being shown in device manager when this unrecognized device error occurs?

Regards,

Anand



Re: Reconnection of self-powered device

Deni posted on 24 Jul 2012 10:17 PM PST
Member
6 Forum Posts

Yes, firmware is based on the firmware framework. It's a composite device, comprising of one CDC device and one custom device that uses WinUSB driver. As I said, everything woks as supposed but when I unplug USB cable and reconnect it again it does not enumerate (VID&PID both appear to be 0x0000). I've programmed a LED to show connection status and disconnect state is detected as well as reconnected but then it hangs somewhere (not detecting if disconnected again). I've made VBUS detection according to application note and I manage DISCON bit accordingly. Any ideas?

regards

Dejan



Re: Reconnection of self-powered device

PRJI posted on 24 Jul 2012 06:45 AM PST
Cypress Employee
333 Forum Posts

 Hi,

    Please create a tech support case (MyAccount -> MyCases).

Thanks

Prajith



Re: Reconnection of self-powered device

aasi posted on 24 Jul 2012 07:17 AM PST
Cypress Employee
1090 Forum Posts

When you say "not detecting if disconnected again" I assume the 2nd disconnect and anything after that is not detected. Please confirm.

If so, most probably your firmware is stuck somewhere due to the disconnect. Have you introduced any dependency in your code based on USB which can cause it to hang in a particular location?

Regards,

Anand



Re: Reconnection of self-powered device

Deni posted on 26 Jul 2012 02:05 PM PST
Member
6 Forum Posts

Yes, you assumed correctly - 2nd and all subsequent reconnects fail. I've set-up debugger to try to locate the fault but it did not help. I placed a breakpoint to disconnect detection point and when hit, made software-reset (the best that can be done in Keil debugger) and still no enumeration. Seems like USB SIE got stuck somewhere and only hardware reset can pull it out. So, I wired an unused I/O port to reset line and it helped. Of course, I have to re-load firmware, but I don't need to power-down and up again. Nevertheless, I am curious how it should be done properly, if possible.

Did anyone managed to build self-powered device with FX2 chip? Any feedback is appreciated.



Re: Reconnection of self-powered device

aasi posted on 26 Jul 2012 07:39 PM PST
Cypress Employee
1090 Forum Posts

Please post the part of code which handles the connect and disconnect I want to have a look at it.  






ALL CONTENT AND MATERIALS ON THIS SITE ARE PROVIDED "AS IS". CYPRESS SEMICONDUCTOR AND ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY OF THESE MATERIALS FOR ANY PURPOSE AND DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THESE MATERIALS, INCLUDING BUT NOT LIMITED TO, ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL PROPERTY RIGHT. NO LICENSE, EITHER EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, IS GRANTED BY CYPRESS SEMICONDUCTOR. USE OF THE INFORMATION ON THIS SITE MAY REQUIRE A LICENSE FROM A THIRD PARTY, OR A LICENSE FROM CYPRESS SEMICONDUCTOR.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms and Conditions of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms and Conditions of this site. Cypress Semiconductor and its suppliers reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Spec No: None; Sunset Owner: GRAA; Secondary Owner: RAIK; Sunset Date: 01/01/20