Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > PSoC® Software > Serial number string sent as string 0!

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



Serial number string sent as string 0!
Moderator:
JFMD

Post Reply
Follow this topic



Serial number string sent as string 0!

johngulbrandsen posted on 12 Jan 2010 9:46 PM PST
Member
3 Forum Posts
I am playing around with the PSoC Development Kit. I created a simple USB test app based on the AN56718 app note (USB BULK Loopback with PSoC). I'm seeing that the PSoC device sends back the serial number string when the host requests the LangId string (i.e. string 0). The USB Spec states that only the LangId string can used for string index 0. This is clearly a bug in PSoC Creator since string 0 appears both in the Device Descriptor and String 0 descriptor.

(See attached files)

My USBFS Configuration is the same as in AN56718 except for the fact that i am using an Isochronous IN EP of size 1023.


Re: Serial number string sent as string 0!

posted on 27 Jan 2010 09:00 AM PST

1 Forum Post
I concur that this is a Creator bug.

I have a workaround.

Using the USBFS component configurator create 3 generic string descriptors, along with the special serial number string. Generate the source code.

in ..\GENERATED_SOURCE\PSoc3\USBFS_1_descr.c,
find the DEVICE descriptor, which starts something like:

/*********************************************************************
Device Descriptors
*********************************************************************/
uint8 USBFS_1_CODE USBFS_1_DEVICE0_DESCR[] = {
/* Descriptor Length */ 0x12u,
/* DescriptorType: DEVICE */ 0x01u,
/* bcdUSB (ver 2.0) */ 0x00u, 0x02u,
.
.
.

then change the string descriptor index for iSerialNumber to a unique non-zero number:

/* iManufacturer */ 0x01u,
/* iProduct */ 0x02u,
/* iSerialNumber */ 0x03u,

Recompile. (Redo the edit after each regeneration of the source code)

The runtime code checks the requested string index against the value stored in the code space device descriptor at the offset of iSerialNumber (at USBFS_1_DEVICE0_DESCR[USBFS_1_DEVICE_DESCR_SN_SHIFT]). If it matches, the special serial number string processing is used.




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: 01/01/20