How do I properly extract the Unique ID from PSoC?

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

cross mob
lock attach
Attachments are accessible only for community members.
Len_CONSULTRON
Level 9
Level 9
Beta tester 500 solutions authored 1000 replies posted

I appreciate having the ability to extract a Unique ID from the IC being used.  This can be very helpful.

However, what is the proper way to extract the 64 bit number?  I tried two ways and get two answers.

If call CyGetUniqueID() with a uint64 array I get the following back:  74240C2109020100

If call CyGetUniqueID() with a uint32 array I get the following back:  0902010074240C21

UART port output:

Unique ID (64 bit): 74240C2109020100

Unique ID (32 bit): 0902010074240C21

You'll notice the numbers are identical EXCEPT that the each set of 32 bits are switched.  It appears to have a long-order endianess.

Attached is a archive of the project for your review.

Len

Len
"Engineering is an Art. The Art of Compromise."
0 Likes
1 Solution

Thank you Len.

the consistence of chips is guaranteed by factory QA.

For FA cases, we requires failure units sent back to review it.

So in this case, you don't need to mind if Cypress has difficulties on everse-engineering the proper fab info.

Thanks,

Ryan

View solution in original post

0 Likes
6 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

System Reference Guide states clearly:

void CyGetUniqueId(uint32* uniqueId)

Description:

Returns the 64-bit unique id of the device

Parameters:

uniqueId: Pointer to a two element 32-bit unsigned integer array.

Return Value:

Returns the 64-bit unique id of the device by loading them into the integer array

pointed to by uniqueId

Bob

0 Likes

If the next question is: "What exactly is in the Unique ID", I got that info from tech support a while back:

Please find the details of 8bytes returned for CyGetUniqueId

Die Y position (0x49000100, y_loc[7:0])

Die X position (0x49000101, x_loc[7:0])

Die Wafer Number (0x49000102, wafer_num[7:0])

Die Lot number LSB (0x49000103, lot_lsb[7:0])

Die Lot number MSB (0x49000104, lot_msb[7:0])

Die production WW (0x49000105, work_week[7:0])

Die production year and fab (0x49000106, year[3:0], fab[3:0])

Die Minor Revision number (0x49000107, minor[7:0])

You can find this described in the register TRM as well or if you check the definition in PSoC Creator.

http://www.cypress.com/file/136211/download

1.3.1343 FLSHID_CUST_TABLES_Y_LOC

Mike.

Roy_Liu
Moderator
Moderator
Moderator
5 comments on KBA First comment on KBA 10 questions asked

Also you can open up the UniqueID code example in PSoC Creator to get understanding the Unique ID of PSoC3/4/5.

pastedImage_0.png

Thanks

Roy

Roy Liu
0 Likes
Len_CONSULTRON
Level 9
Level 9
Beta tester 500 solutions authored 1000 replies posted

Thank you Bob,

I'm aware of the cyboot call.

Thank you Mike,

However, I don't think your supplied info matches the PSoC 5LP  format based on the UniqueID example project.

Thank you Roy,

I downloaded the project example.   It breaks down the 8 byte ID into Fab info.

As you can see by the archived project, I have no problem extracting the 64 bit uniqueID.

Theoretically, the number retrieved can be used by me in either form.  I just need a unique number to coordinate among multiple instances  of  my product being used on the same computer.

My concern is if I needed to report the specific uniqueID to Cypress for some FAE issue, if the number is longword-order reversed, Cypress may have difficulty reverse-engineering the proper fab info.

Len

Len
"Engineering is an Art. The Art of Compromise."

Thank you Len.

the consistence of chips is guaranteed by factory QA.

For FA cases, we requires failure units sent back to review it.

So in this case, you don't need to mind if Cypress has difficulties on everse-engineering the proper fab info.

Thanks,

Ryan

0 Likes

Ryan,

Thanks for the feedback.

Len

Len
"Engineering is an Art. The Art of Compromise."
0 Likes