2 Replies Latest reply on Jul 24, 2012 6:05 AM by ali.ulucan

    Adding serial number descriptor to FX3 firmware

    ali.ulucan

      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
          rama.sai.krishna.vakkantula

          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
            ali.ulucan

            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