You are here

Accessing String Descriptors | Cypress Semiconductor

Accessing String Descriptors

Summary: 1 Reply, Latest post by Madhu Sudhan on 07 May 2015 10:19 PM PDT
Verified Answers: 0
Last post
Log in to post new comments.
MyDirtIsRed's picture
10 posts


I'm a little bit confused as to how to access string descriptors after they've been set.  In the application that I'm coding for,  several string descriptors are initialized with default values.  However, after initialization, the firmware queries an on-board EEPROM and changes the string descriptors based upon the values loaded in the EEPROM.  The firmware also has the ability to modify the contents of the EEPROM, which then requires the string descriptors to be refreshed.  I utilize the CyU3PUsbSetDesc function to set the string descriptors, but I don't see a listing in the API guide for a similar 'Get' function.  There is CyU3PUsbGetDevProperty, but I can't find any examples in the SDK that use this function, so I'm not sure it's relevant (side question: how does this function work and what would it be used for?).  In some of the examples, if a descriptor is requested, the requisite array that was used to initialize the descriptor is returned.  However, if the 'Set' function fails, this value will not have been initialized in memory.  The other alternative I've seen is CyFx3BootUsbGetDesc.  Are these pointer values still valid, i.e. can I call this function even after the RTOS is up and running and get the right values?


mady's picture
Cypress Employee
964 posts


If I understood correctly, you are trying to access the value of the string descriptor which you have set already. In that case,  before calling the CyU3PSetDesc API, you can take a back up of the value which has been set using that Descriptor.

Please note that CyU3PSetDesc  API only stores the string descriptor in an internal structure. It doesn't yet send the descriptor to the Host PC. Only after the CyU3PConnectState is called, the descriptor is sent to Host.


-Madhu Sudhan



Log in to post new comments.