cancel
Showing results for 
Search instead for 
Did you mean: 

A 16bit unique ID of MCU

MHoss.1
Associate III

I need a unique 16bit ID for each device. I know the device ID is unique but it is 96bits. I'm not sure if different parts of the 96bit point to specific characteristics or the whole 96bits are made random? To be more specific, I want to know what 16bit of it I can cut and be sure that it is LEAST LIKELY to be repeated on two devices?

The datasheet says "The 96-bit unique device identifier provides a reference number which is unique for any device and in any context." but doesn't provide any further information.

PS: I know that by cutting part of it there is chance of repetition, but it is fine as long as it is random. For example if I pick a part that points to production date then all the MCUs in one batch we get would have the same random bits which is what I'm trying to avoid.

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Guru

A real easy way to do this is to use the CRC calculation built into the hardware. Can't guarantee uniqueness, of course.

If you feel a post has answered your question, please click "Accept as Solution".

View solution in original post

8 REPLIES 8
SSone.1
Associate III

When I connect my device via ST-Link program it shows something like below. It maybe what you looking for.

0693W000001pahgQAA.jpg

Do a hash of the Unique ID

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

But that's the same for every part on the tray...

The OP is talking about getting a unique number that is a subset of the 96-bit Unique ID as that's not random, just guaranteed to be unique for each die produced

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
TDK
Guru

A real easy way to do this is to use the CRC calculation built into the hardware. Can't guarantee uniqueness, of course.

If you feel a post has answered your question, please click "Accept as Solution".

Does improve the distribution over the number space for consecutively tested/programmed parts.

L​FSR, CRC, or equivalent hashing method. Better than XORing a couple of words which is what ST usually does, see LoRa and USB examples.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
turboscrew
Senior III

Also, there can only be 65539 unique 16-bit values.

I guess some BIG buyer alone can purchase that amount.

I think the unique ID discussed here is the one made of lot number, wafer number, and X- and Y-coordinates of the chip on the wafer?

MHoss.1
Associate III

CRC is a really good idea. Also I realized if I have a random number I can just get the mod to reduce it to a desirable size. The distribution should be whether the original distribution is uniform or normal.

That's true but we are not a big buyer, if we sell 20,000 units I'll send you a champagne. I want this random number for part of a LoRa message and since we have restricted air time the options are limited. So as long as the distribution is even it would suffice.