Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > USB Controllers > Problems in CyU3PUsbStart() and CyFx3BootUsbStart() in case of no re-enumeration

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



Problems in CyU3PUsbStart() and CyFx3BootUsbStart() in case of no re-enumeration
Moderator:
RSKV

Post Reply
Follow this topic



Problems in CyU3PUsbStart() and CyFx3BootUsbStart() in case of no re-enumeration

kalev posted on 07 Sep 2012 2:18 AM PST
Senior Member
15 Forum Posts
Hi,
 
I detected two concurrency problems in CyU3PUsbStart() and CyFx3BootUsbStart() related to jumping from one program to another without USB re-enumeration.
 
1) When host initiates Control request before calling CyU3PUsbStart()/CyFx3BootUsbStart(), this request hangs forever at host side. Seems like the functions clear pending SETUP packet flag without invoking respective processing handlers.
 
2) CyU3PUsbStart()/CyFx3BootUsbStart() enable processing of SETUP packets immediately, making it impossible to register user callbacks beforehand.
 
Currently API preserves Boot Loader descriptors and there is no need to register descriptors again in application. In practice, application should match boot loader descriptors and therefore it can register these descriptors again itself as well. And, while no re-enumeration is needed, typically there are also some user/application specific data that must be passed between programs, so the designers have to invent their own methods for exchanging data anyway.
In my opinion, enabling USB without re-enumeration should follow the same logic as with enumeration - actual USB enabling should be performed in CyU3PConnectState/CyFx3BootUsbConnect, after the application has performed complete initialization.
 
Regards,
D
 



Re: Problems in CyU3PUsbStart() and CyFx3BootUsbStart() in case of no re-enumeration

RSKV posted on 16 Sep 2012 11:53 PM PST
Cypress Employee
655 Forum Posts

Hi,

I did not get your question clearly.

CyU3PUsbStart() API just initializes the USB block in the FX3. CyU3PConnectState() is the one causes the FX3 device to enumerate.

Regards,

sai krishna.



Re: Problems in CyU3PUsbStart() and CyFx3BootUsbStart() in case of no re-enumeration

kalev posted on 17 Sep 2012 03:25 AM PST
Senior Member
15 Forum Posts
Hi,
 
I am jumping from (secondary stage) Boot Loader to Application (and vice versa) without device re-enumeration.
 
Excerpt from FX3 Firmware API Guide CyU3PUsbStart description:
<<<<<
CY_U3P_ERROR_NO_REENUM_REQUIRED - FX3 Booter supports the No ReEnumeration feature that enables to have a
single USB enumeration across the FX3 booter and the final application. This error code is returned by CyU3PUsbStart () to
indicate that the No Re-Enumeration is successful and the sequence followed for the regular enumeration post
CyU3PUsbStart () is to be skipped.
>>>>>
 
As I have understood,  in case of no ReEnumeration, CyFx3BootJumpToProgramEntry/CyU3PUsbJumpBackToBooter disable processing of (USB) interrupts temporarily and CyU3PUsbStart/CyFx3BootUsbStart enable them immediately again. I verified, USB requests (like get string descriptor, etc.) are processed by API default USB setup handler immediately after calling CyU3PUsbStart and before calling CyU3PUsbRegisterSetupCallback. So, there exists a gap where no user specific callbacks are called.
 
Also, the device should handle setup requests somehow while jumping from one program to another. The best will be to delay the handling a bit until FX software is operational again. Right now the request hangs forever on host side if the request gets sent between CyFx3BootJumpToProgramEntry and CyU3PUsbStart.
  
Regards,
D





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.