2020-04-21 05:43 AM
I need to have a unique ID on 32bits. Unique ID of STM32G0x is on 96bits.
It may have some stucked bit for '0', for example for XY wafer position, maybe others (lot #)?
I've seen that " exact information about valid bits not fixed to 0 for given decives are available up on the request":
It is possible to know which bits will be stucked to '0'?
Thanks a lot!
2020-04-21 06:23 AM
You could take the 96 bits, feed them into a CRC32 and use the result. Fairly high probability the result will be unique enough.
2020-04-21 07:19 AM
Thanks TDK for your asnwer, but "fairly high probability" is not safe enough for me :hushed_face: . I really need to know which bits are stucked.
2020-04-21 08:11 AM
It's unlikely that 64 of the 96 bits are unused in order to guarantee a unique 32-bit ID.
If 1:4294967296 is too high a probability for your project, burn your own unique ID into the OTP bits.
2020-04-21 11:53 AM
I know you won't like this answer, but the best you can do is simply generate your own unique ID when programming the device, as TDK said above.
JW
2020-04-21 01:25 PM
Hashing will get more "randomness" in the bit patterns, but won't be unique, ie can't really cram down a 96-bit unique into a 32 or 64-bit value and expect it to be "unique" too