Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > USB Controllers > FX3 re-enumeration from altsetting

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



FX3 re-enumeration from altsetting
Moderator:
RSKV

Post Reply
Follow this topic



FX3 re-enumeration from altsetting

bubla posted on 18 Sep 2012 7:08 AM PST

1 Forum Post

 Hello

I'm trying to simulate two devices in one firmware application but I've a problem with reenumerating device. I have separate descriptors for each device and I want to switch between them using set_interface and altsetting (and flag glIsHid).

According to USB analyzer after reenabling CyU3PConnectState there is timeout while responding to SET_CONFIGURATION request, unfortunately the situation is the same if I'm not switching the flag and  just trying to reenumerate device without changing descriptors. As a base I'm using BulkLoopAutoEnum. Code:

 case CY_U3P_USB_SC_SET_INTERFACE:

        {  glUsbInterface = wValue;

if(wValue == HID_SWITCH_INTERFACE)

{

CyU3PReturnStatus_t apiRetStatus = CY_U3P_SUCCESS;

glIsHid = CyTrue;

apiRetStatus = CyU3PConnectState(CyFalse, CyTrue);

    if(apiRetStatus == CY_U3P_SUCCESS)

    CyU3PConnectState(CyTrue, CyTrue);

}

        }

With separate img each simulated device enumerates properly.

Regards R. 

 




Re: FX3 re-enumeration from altsetting

kalev posted on 18 Sep 2012 10:22 AM PST
Senior Member
15 Forum Posts

Hi,

>  there is timeout while responding to SET_CONFIGURATION request,

You probably missed to call CyU3PUsbAckSetup before USB disconnect.

Regards,

K



Re: FX3 re-enumeration from altsetting

kalev posted on 18 Sep 2012 11:02 AM PST
Senior Member
15 Forum Posts
Hi,
 
Sorry, I was so hurry with reply. Of course not calling CyU3PUsbAckSetup should not affect reenumeration because from host viewpoint the USB is reset anyway. But, you never know, maybe it's still good to call it and return CyTrue from Setup callback to keep device setup handler and host setup requests in sync. See my post http://www.cypress.com/?app=forum&id=167&rID=68852
 
Regards,
K





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.