You cannot set the serial number, but you can use the provided silicon ID within the chip. Refer to the "System Reference Guide" (Creator Help) and look for CyGetUniqueId() API.
I need the host to be able to identify specific boards when I have multiple copies of the same PSOC board.
How can you use the CyGetUniqueId() to choose a specific board if the VID/PID are the same ?
That might need some communication between host and slaves.
Alternatively you can use the internal EEProm which contents can be set at programming time.
Please go to Find new code examples > UniqueID_Example.
You will find information about its implementation there. The function CyGetUnqiueId() returns a 64 bit unique id with the following details:
Die Y position (xxxxxx, y_loc[7:0])
Die X position (xxxxx, x_loc[7:0])
Die Wafer Number (xxxxxx, wafer_num[7:0])
Die Lot number LSB (xxxxx, lot_lsb[7:0])
Die Lot number MSB (xxxxxx, lot_msb[7:0])
Die production WW (xxxxxx, work_week[7:0])
Die production year and fab (xxxxxx, year[3:0], fab[3:0])
Die Minor Revision number (xxxxxxx, minor[7:0])
Hence, every board will have a unique id.
Do you know the web page of the CyGetUnqiueId() example ? I have looked but have
been unable to find anything.
The code to get the unique silicon ID is very simple: