You are here

Serial number string sent as string 0! | Cypress Semiconductor

Serial number string sent as string 0!

Summary: 1 Reply, Latest post by Manasa R on 27 Jan 2010 11:00 AM PST
Verified Answers: 0
Last post
Log in to post new comments.
johngulbrandsen's picture
3 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.

Manasa R's picture
1 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



/* 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.

Log in to post new comments.