3 Replies Latest reply on Aug 26, 2019 2:04 PM by NoNo_3538426

    Adding serial number descriptor to FX3 firmware

      Hello,

         


      How can we add serial number descriptor to FX3 firmware design? "boot_fw" example firmware has serial number descriptor.
      I looked at the example and I added following serial number definition and I called following function in the code but Control Center did not show the serial number. By the way, we can see the bootloader's serial number in Control Center.

         


      Regards,
      Ali

         


      const uint8_t CyFxUSBSerialNumDesc [] =
      {
          0x1A,                           /* Descriptor size */
          CY_U3P_USB_STRING_DESCR,        /* Device descriptor type */
          '0',0,'0',0,'0',0,'0',0,'0',0,'0',0,
          '0',0,'0',0,'0',0,'A',0,'A',0,'A',0,
          0,0,                            /* long word align */
      };

         


      apiRetStatus = CyU3PUsbSetDesc(CY_U3P_USB_SET_STRING_DESCR, 3, (uint8_t *)CyFxUSBSerialNumDesc);

        • 1. Re: Adding serial number descriptor to FX3 firmware

          Please check whether you are doing the following change:

             

                             

             

          /* Standard device descriptor for USB 3.0 */

             

          const uint8_t CyFxUSB30DeviceDscr[] __attribute__ ((aligned (32))) =

             

          {

             

              0x12,                           /* Descriptor size */

             

              CY_U3P_USB_DEVICE_DESCR,        /* Device descriptor type */

             

              0x00,0x03,                      /* USB 3.0 */

             

              0x00,                           /* Device class */

             

              0x00,                           /* Device sub-class */

             

              0x00,                           /* Device protocol */

             

              0x09,                           /* Maxpacket size for EP0 : 2^9 */

             

              0xB4,0x04,                      /* Vendor ID */

             

              0xF0,0x00,                      /* Product ID */

             

              0x00,0x00,                      /* Device release number */

             

              0x01,                           /* Manufacture string index */

             

              0x02,                           /* Product string index */

             

              0x03,                           /* Serial number string index */

             

              0x01                            /* Number of configurations */

             

          };

             

           

             

          /* Standard device descriptor for USB 2.0 */

             

          const uint8_t CyFxUSB20DeviceDscr[] __attribute__ ((aligned (32))) =

             

          {

             

              0x12,                           /* Descriptor size */

             

              CY_U3P_USB_DEVICE_DESCR,        /* Device descriptor type */

             

              0x10,0x02,                      /* USB 2.10 */

             

              0x00,                           /* Device class */

             

              0x00,                           /* Device sub-class */

             

              0x00,                           /* Device protocol */

             

              0x40,                           /* Maxpacket size for EP0 : 64 bytes */

             

              0xB4,0x04,                      /* Vendor ID */

             

              0xF0,0x00,                      /* Product ID */

             

              0x00,0x00,                      /* Device release number */

             

              0x01,                           /* Manufacture string index */

             

              0x02,                           /* Product string index */

             

              0x03,                           /* Serial number string index */

             

              0x01                            /* Number of configurations */

             

          };

             

           Regards,

             

          sai krishna.

          • 2. Re: Adding serial number descriptor to FX3 firmware

            Sai,

               


            These fields were 0x00. I changed fields with 0x03 as you said. Now, I can see the serial number in Control Center.

               


            Thank you for your help.
            Ali

            • 3. Re: Adding serial number descriptor to FX3 firmware
              NoNo_3538426

              Hello,

              I can see the Serial Number with the above settings at Cy Control Center in Windows, Everything is OK, but when I check with lsusb -v -d command in Linux, i can not see the serial number.