Unique Idenfication (UID) Questions

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Unique Idenfication (UID) Questions

2,154 Views
dspNeil
Contributor III

I'm loooking at using the SIM_UID registers (SIM_UIDH, SIM_UIDMH, SIM_UIDML, SIM_UIDL) as a means of identifying specific boards.

 

1) Am I correct that these registers will be 100% unique for each processor?

2) Do I need to use all 4 registers to guarantee uniqueness, or is using the lower 1 or 2 "good enough" (we only produce a few hundred products a year).

3) How do I read out these values?  I can't find the registers defined in any of the MQX BSP/PSP files.

4) Any suggestions for generating unique software "unlock" keys using a processor's UID, to enable specific-user features?

 

 

0 Kudos
4 Replies

851 Views
BenGartner
Contributor II

1) They will be 100% unique.

2) I asked the same question as I had two sample units where SIM_UIDMH was different, but the other registers were the same. I thought this was odd and I was told that I had to use all 4 registers to guarantee uniqueness.

3) There should be bare-metal header files available to access these registers.

0 Kudos

851 Views
dspNeil
Contributor III

I ended up answering most of these myself. To add to Ben's response:

 

3) There are indeed headers available. The processor headers define these registers. In my case, using MQX 3.8, the registers are defined in MK53DZ10.h. You can access the 128 bits as, for example:

printf( "CPU Unique Identifier:\n" );printf( "0x%08X 0x%08X 0x%08X 0x%08X\n", SIM_UIDH, SIM_UIDMH, SIM_UIDML, SIM_UIDL );

4) To generate unique keys, I use the CPU ID as one of the block inputs to a 128-bit AES encryption algorithm. The cryptographic acceleration unit was a huge pain to get working, but it is now working well for me, and is used numerous times on each boot.

 

 

0 Kudos

851 Views
ignisuti
Contributor IV

Bumping this back to the top of the list as I also have the same questions. Very little documentation on this feature.

0 Kudos

851 Views
GottiLuca
Contributor IV

 

I'm very interested to this thread , it is possible to have an answer ?

This UID registers uniquely identify each different microcontreller part ??

 

0 Kudos