3 Replies Latest reply on Apr 6, 2012 3:17 AM by anandsrinivasana_

    Multiple configuration descriptors with FX2

      I would like to use multiple configuration descriptors.  One of them would have a DirectSound interface (and that interface would not receive data from the Cypress driver), the other would not have that interface and instead the Cypress driver would provide the data that DirectSound would have using the vendor-defined interface.


      I have added the extra configuration descriptor (and associated interface/endpoint descriptors) to dscr.a51.  I also modified SetupCommand(void) so that SC_GET_DESCRIPTOR / GD_CONFIGURATION (and GD_OTHER_SPEED_CONFIGURATION) will return the correct descriptors.  I also modified the ISR's Ures and Highspeed so that they correctly handle switching the configuration types from CONFIG_DSCR to OTHERSPEED_DSCR.


      If I manully enter the commands for getting the DirectSound descriptor, I get back the correct descriptor.  However, when I send the command for setting the DirectSound descriptor, nothing happens; I don't see a DirectSound device and no data flows to the FX2.


      When I look in the CyConsole or the USB Control Center, I can see two configurations, but they're both "configuration 1".  I know that my DirectSound config descriptor is set correctly - recall that get descriptor works fine, and shows configuration 2.


      Do I need to disconnect and reconnect from the USB using USBCS in order for the new DirectSound configuration descriptor to be seen?  Why can't the Control Center or Console see the other configuration descriptor?

        • 1. Re: Multiple configuration descriptors with FX2





          Cy[press Usb device driver, CyUSB.sys, and our libraries currently doesn't support multiple configurations. It supports only one configuration as of now.  







          • 2. Re: Multiple configuration descriptors with FX2

            Hi Gayathri, thanks for the information.  A quick google suggests that WinUSB also has a one-configuration limitation.




            Would it be possible to "fake" multiple configurations by doing what amounts to Re-Numeration?  For example, my descriptors will report that I only have one configuration, but my software will know that I secretly have two configurations.  So it will issue a vendor command which would force a disconnect with USBCS |= 0x80; wait three seconds; change which configuration descriptor I report for enumeration; and then reconnect with USBCS &= ~0x80.




            I think that will accomplish my goal, but I would be interested to hear if you have any other suggestions.

            • 3. Re: Multiple configuration descriptors with FX2

              Hi Andrew,


              When you say two configuration are they both implementing 2 separate classes or are they both vendor specific class. CyUSB.sys will just pass up the descriptor irrespective of what it contains. It comes down to the matter of being able to set configuration (I remember windows low level drivers not letting us do that). I'll check on that and get back to you.