cancel
Showing results for 
Search instead for 
Did you mean: 

Hello, I am using STM32L4xx MCU, the UID is 96bits, I have got the 96-bit. Unfortunately I have only 64 bits space for serial number. so I have to convert the 96-bit to 64-bit, and the converted 64-bit must be unique. does anyone have the solution?

JChen.6
Associate II
 
4 REPLIES 4

You can create a hash, but it won't be guaranteed to be unique. I've found a 64-bit CRC to be satisfactory.

If it has to be unique, you should generate your own code and burn it into your product in production/final test.

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

i think the 96bit is a concatenation of bit fields which are not used fully, such as die posiion in wafer, wafer and lot number, etc which helps traceability. maybe it would be good to provide in HAL a function providing 32, 48 and 64 bits nearly unique numbers from the 96 bits. As in embeddd world few years back the sold mcu counter reached several billions, we already need more than 32 bit....

Thanks for your solutions

There are 56-bit LOT NUM, how does ST control this number? is it safety to simply take the LSB 24bits and ignore its MSB 32-bit?