Hello,
I need to use an unique identification number for serial production. Kinetis family have an unique 128 bits number, but I need a shorter number(64 bits). What is the structure of the UID? Can I obtain from the UID a unique number of 64 bits?
Very thanks.
Miguel Ángel.
已解决! 转到解答。
Hi, Miguel
The Unique ID number must be used with the complete 128-bit number; we cannot assume that the LSB/MSB part is going to be unique. The Unique ID is programmed during manufactory and the algorithm to generate. The algorithm cannot be shared. If you get some chips and read out these UID registers, you can find there is no abvious regularity between them. I am sorry for the inconvenience. Thanks a lot for your understanding.
Best Regards
Paul
I ran into this thread via google search, if anyone else does as well I'd like to share my current solution. You can reduce the ID by XORing registers together, for example:
uint64_t idCodeShort = (((uint64_t) (SIM_UIDMH ^ SIM_UIDML)) << 32) | ((uint64_t) (SIM_UIDL ^ SIM_SDID));
Or:
uint32_t idCodeEvenShorter = (SIM_UIDMH ^ SIM_UIDML ^ SIM_UIDL ^ SIM_SDID);
This WILL NOT guarantee a unique code but may be suitable for your particular situation (seed value/etc).
Dear Paul,
we need use 64 bits code only, because this number is so long (UID 128 bits) for our identification system. Is very important for us reduce it to 64 bits. If you know the structure of this number and if some bytes are repeated maybe we reduce it to 64 bits without repeat any number.
Can you help me? What is the structure used for this number? We only use Kinetis family.
Very thanks Paul. Best Regards,
Miguel Ángel.
Hi, Miguel
The Unique ID number must be used with the complete 128-bit number; we cannot assume that the LSB/MSB part is going to be unique. The Unique ID is programmed during manufactory and the algorithm to generate. The algorithm cannot be shared. If you get some chips and read out these UID registers, you can find there is no abvious regularity between them. I am sorry for the inconvenience. Thanks a lot for your understanding.
Best Regards
Paul