cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L0x0, are "unique ID bits [95:64]" of "Unique device ID registers (@0x1FF8 0050)" uniques?

DMarc
Associate II

I am working with STM32L010C6T6 MCUs. I need a way to consistently and uniquely identify each MCU with as few bytes as possible. The 96 bits "Unique device ID" register seems ideal but what is the minimal number of bytes I need?

Are all 96 bits mandatory to fulfil my needs? At a first look, the answer seems to be no as 4 bytes seems to be enough but I am not sure.

In Reference Manual RM0451, section 25.2, page 730-731 the 96 bits "Unique device ID registers" are described as follows:

  • [23-0]: LOT_NUM in ASCII code
  • [31-24]: WAF_NUM in 8 bits unsigned number
  • [63-32]: LOT_NUM in ASCII code
  • [95-64] Unique ID bits

Here are my assumptions. We have 3 distinct fields:

  • LOT_NUM: An ASCII string represented by 56 bits => 7 chars/bytes. I assume that only the 7 LSB bits of each byte are significant (standard ASCII code represented on 7 bits) and this string may be common among MCUs of the same Lot.
  • WAF_NUM: A Wafer number represented by 8 bits => 1 byte. I assume that all bits are significant and this number may be common among MCUs of the same Wafer.
  • Unique ID: A unique ID number represented by 32 bits => 4 bytes. I assume that all bits are significant and this number is unique but to what extent ?

Is the "Unique ID" field really unique? If yes, is it unique among all STM's MCU/MCPs, all STM32 MCUs, all STM32L0 Series, STM32L0x0 Value Line, …

Below is the full UID registers of two distinct STM32L010C6T6 I own.

0693W00000aIpjRQAS.png

1 ACCEPTED SOLUTION

Accepted Solutions
Peter BENSCH
ST Employee

In fact, the 96bit ID is unique and likewise a certain part of the ID always seems to be the same. However, the last statement refers only to the devices just considered. If you take STM32L010C6T6 from a different batch, the other IDs are guaranteed to differ. In the reference manual some parts of the Unique ID are mentioned, but you cannot draw any conclusions concerning the family or similar. If you want to use the Unique ID, you would actually have to use the full 96bit.

Since this does not seem to make sense in your case, you can use as an alternative e.g. an own Unique ID as suggested by Jan, whose width you define so large that in no case over the life cycle of the system the same number is used twice, e.g. with assumed 50k/a and 50 years life span 2.5Mio, i.e. approx. 22bit, incl. possibly check bits (simple sum or similar to IBAN) e.g. 24bit = 3 bytes.

Would that be a viable suggestion?

Regards

/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

6 REPLIES 6
Peter BENSCH
ST Employee

Welcome, @Duverney Marc André​, to the community!

Yes, the 96-bit Unique device ID, if present and mentioned in the reference manual, is unique across all STM32 ever produced by STMicroelectronics.

Important: of course, this only applies to originals from STMicroelectronics, because counterfeits have been found without this or with the same unique ID.

In your example, the IDs only differ in bit 80.

Does it answer your question?

Regards

/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
DMarc
Associate II

Hi @Peter BENSCH​,

Thank you for answering me.

Unfortunately it doesn't answer the entirety of my question. I was already able to establish the uniqueness of the whole 96-bit field. Knowing it extend to all STM32 ever produced is useful to know.

In addition, I whish to know if I could use only a part of the 96 bits and what are the consequences of doing so, especially given the name of the last field (i.e. "Unique ID" @ page 731 of RM0451). I am aware that the name of the field (32-bit "Unique ID") is confusing with the name of the whole identifier (96-bit "Unique device ID").

My design is a low power device with radio communication running on battery. Sending all 12 bytes of the 96 bits identifier would represent near the half of my overall consumption.

Therefore, I would like to obtain a more details description of this identifier. The filed named "Unique ID" suggests a certain uniqueness but to what extent? If this is unique across the whole STM32L0 series, I am good to go with only 4 bytes.

Moreover, if the same field named "Unique ID" is not unique at all, the ASCII nature of the field named LOT_NUM, if in standard ASCII, implies that all MSB bit of each byte is always '0'. (which seems to be true on the two samples I showed in my first message). As there is 7 LOT_NUM byte, if there is at least one more bit whose state is always known, I could at least save one byte over my communication.

Thank you for reading me. Have a nice day.

> I wish to know if I could use only a part of the 96 bits

Not if you want the ID to be unique.

> and what are the consequences of doing so

Collisions, i.e. two devices may be undistinguishable.

Don't be focused on the naming of registers, it won't help. If you want true unique ID of any length other than 96 bits, you have to generate it yourself at production time, and program it together with the firmware.

JW

Peter BENSCH
ST Employee

In fact, the 96bit ID is unique and likewise a certain part of the ID always seems to be the same. However, the last statement refers only to the devices just considered. If you take STM32L010C6T6 from a different batch, the other IDs are guaranteed to differ. In the reference manual some parts of the Unique ID are mentioned, but you cannot draw any conclusions concerning the family or similar. If you want to use the Unique ID, you would actually have to use the full 96bit.

Since this does not seem to make sense in your case, you can use as an alternative e.g. an own Unique ID as suggested by Jan, whose width you define so large that in no case over the life cycle of the system the same number is used twice, e.g. with assumed 50k/a and 50 years life span 2.5Mio, i.e. approx. 22bit, incl. possibly check bits (simple sum or similar to IBAN) e.g. 24bit = 3 bytes.

Would that be a viable suggestion?

Regards

/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
DMarc
Associate II

These are the answers I was afraid to read. I hoped there was a more detailed description/ruleset governing these UID fields to further adapt its use to specific applications.

However, I understand it is difficult to further constrain the UID construction, given that all future STM's productions have to comply with the uniqueness of the previous ones.

For now, we will stick to using the last four bytes of the 96-bit field and introduce a control in the production process to exclude duplicates. Depending on the rejection rate, a custom ID will be implemented.

Thank you for your time. Have a nice day.

Is there a way to flag this thread as resolved or something?

Yes, if the problem is solved, please mark this thread as answered by selecting Select as best, as also explained here. This will help other users find that answer faster.

Good luck!

/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.