Skip to main content
JChen.6
Associate II
July 17, 2020
Question

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?

  • July 17, 2020
  • 2 replies
  • 1230 views

..

This topic has been closed for replies.

2 replies

Tesla DeLorean
Guru
July 17, 2020

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 VenmoUp vote any posts that you find helpful, it shows what's working..
JChen.6
JChen.6Author
Associate II
July 20, 2020

Thanks for your solutions

S.Ma
Principal
July 18, 2020

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....

JChen.6
JChen.6Author
Associate II
July 20, 2020

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?