Yes, that's possible.
The Product ID is part of the descriptor. It is located in USBFS_descr.c file generated by the USBFS component. If you want to modify the descriptor, you can set the macro USER_SUPPLIED_DESCRIPTORS and define your own descriptor, including the Product ID.
May I ask why you want to set 'unique' PIDs?
Setting a unique PID has its own challenges.
- Making sure at manufacturing time each unit has a unique number.
- There are only 65536 combination of PIDs to assign. Once you use up ALL the PIDs you effectively need to purchase another VID.
- The USB configuration .inf file is usually dependent on the VID and PID. Therefore a unique .inf may be needed to configure each uniquely numbered PID.
There may be other methods to use to create and manage a 'uniqueness' in your products. The most common method is to assign a 'unique' serial number.
In the USB definition, there is a query for the USB device serial number. This is so that products built in the thousands if not millions can have the same VID and PID and the product can be differentiated on the same system by way of the unique serial number.
Serial numbers can be assigned:
- Manually. Laborious can prone to mistakes.
- The manufacturing process assigns a build number that is unique. This usually include:
- build date
- build time
- build manufacturing line
- other relevant HW variations.
- Use the PSoC's uniquely assigned Silicon ID. It is a 64-bit number. This is the method commonly used by USB devices.
The PSoC UART (COM:) serial driver uses the Silicon ID to differentiate and enumerate each COM device configured with its' Silicon ID. Using the same VID and PID, the system uses the SAME driver but assigns a new (next in sequence) COM port when it finds a USB.
One of my systems has the COM enumeration up to COM115 because I have created about 113 PSoC serial comm devices with the same VID and PID. At any time, I can at anytime place a number of my PSoC serial devices on this same computer and through the COM number assignment communicate to each one at the same time.
Hopefully this has helped you.