Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > PSoC® 5 > USBUART reconnect

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



USBUART reconnect

Summary: 8001 Views, 1 Replies, Latest reply by U2 on 04 May 2011 03:31 AM PST

Verified Answers: 0

Post Reply


torpe posted on 03 May 2011 4:42 AM PST
Member
5 Forum Posts

I'm using the USBUART component from app note EP60246 but the question might also be valid for other USB interfaces.

Everything works fine until the USB cable to the PC is unplugged. Now USBUART_bGetConfiguration() still reports a non-zero value. If I replug the PC and try to write to it USBUART_Write() fails to return.

How can I detect the unplug and reconnect and reinitialize my USBUART component when possible?

 

Thanks



 

U2 posted on 04 May 2011 03:31 AM PST
Cypress Employee
589 Forum Posts
  • This can be done in two ways.
  • Method1:  A simple and easy way would be to monitor VBUS supply voltage. Place a Digital Input Pin on the TopDesign and connect it to the USB VBUS. Once you disconnect PSoC from PC there is no voltage on VBUS, the same can be used to ascertain device unplugged from host. Once VBUS power comes back, USB device can be re-enumerated again.
  • Method 2:  The USBFS component can be configured to bring out the SOF terminal which is the USB start of Frame signal. The same can be monitored and the inactivity on this terminal implies no host is connected.

Let us know if one of these work.



 

Post Reply






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: KXP; Secondary Owner: VWA; Sunset Date: 06/15/20