Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

PSoC™ 5, 3 & 1 Forum Discussions

MaMi_1205306
Level 7
Level 7
500 replies posted 50 solutions authored 25 likes received

Hi,

We would like to confirm for the “Serial Number String” of the USB component.

The USB serial number string is the “User Call Back” option.
The serial number of the product is registered using USBFS_SerialNumString () API.

Processing is performed as follows.
/***********************************************************************/
USBFS_SerialNumString ()
  USBUART_Start (0, USBUART_DWR_VDDD_OPERATION);
If (USBUART_IsConfigurationChanged ())
  {
  While (USBUART_GetConfiguration () == 0);
  USBUART_IsConfigurationChanged ();
USBUART_CDC_Init ();
}
/***********************************************************************/


The serial number string is set with 9 characters, but the serial number string is not set correctly.

When CyDelay () is inserted between USBUART_Start () and USBUART_IsConfigurationChanged (),

the serial number string seems to be set normally.(Delay time is about 300ms)

Even if the settings are the same (source code),
The serial number can be set, sometimes it cannot, and the operation is unstable


When setting the serial number string, are there any problems with the procedure described above?
Could you tell us about the correct usage of the USBFS_SerialNumString () API?
(Component start timing and API usage timing, etc.)

Regards,

0 Likes
1 Solution
AnkitaS_51
Employee
Employee
100 likes received 50 likes received 25 likes received

Hello,

The procedure to use USB Serial Number string is mentioned in this KBA:

Serial Number String – KBA89259

I did so and was able to set the Serial Number String of the USB component using USBFS_SerialNumString () API.

I used this string "uint8 snString[22]={0x14,0x03,'F',0,'W',0,'S',0,'N',0,'P',0,'K',0,'A',0,'K',0,'S',0};" which has 9 characters.

I am attaching the project that I used to verify the functioning of USBFS_SerialNumString () API. Please check that and verify with your project. I didn't needed to add any delay.

I checked whether proper Serial String is being set during enumeration by using USB Log analyzer which is as shown  below:

pastedImage_1.png

View solution in original post

0 Likes
2 Replies
AnkitaS_51
Employee
Employee
100 likes received 50 likes received 25 likes received

Hello,

The procedure to use USB Serial Number string is mentioned in this KBA:

Serial Number String – KBA89259

I did so and was able to set the Serial Number String of the USB component using USBFS_SerialNumString () API.

I used this string "uint8 snString[22]={0x14,0x03,'F',0,'W',0,'S',0,'N',0,'P',0,'K',0,'A',0,'K',0,'S',0};" which has 9 characters.

I am attaching the project that I used to verify the functioning of USBFS_SerialNumString () API. Please check that and verify with your project. I didn't needed to add any delay.

I checked whether proper Serial String is being set during enumeration by using USB Log analyzer which is as shown  below:

pastedImage_1.png

0 Likes

I understand this issue.
Thank you for your support.

0 Likes