cancel
Showing results for 
Search instead for 
Did you mean: 

Unique ID in STM32L100R8T6TR

Kbruhn97
Visitor

Greetings ST Community,

I am a junior embedded developer, and I have recently worked on a project utilizing some old systems which run on the STM32L100R8T6TR chips. I had a need for an unique chip identifier for use in a communication protocol, and therefore I attempted to use the 96-bit UIDs in these chips. However, I now have two questions regarding these UIDs.

First off, I used the firmware created for the platform I was developing on, and the UIDs fetched using the addresses specificed in this firmware access the address 0x1FF80050U as the UID_BASE address, and then +4U and +8U for the next sections of the 96-bit UID respectively. The values extracted using those value seem like the correct values, however I have now found two chips from a sample of 16 with the exact same UIDs unfortunately: 30h 35h 47h 04h 39h 39h 32h 39h 03h B7h FCh 48h 
I investigated this issue by consulting the documentation, which led me to my next question...

Secondly, the documentation instructs me to access other addresses than the one specified in the firmware on our platform. In the documentation, which is specifically "RM0038 Rev 18 for STM32L100xx, STM32L151xx, STM32L152xx and STM32L162xx advanced Arm®-based 32-bit MCUs", the final 32 bits of the UID are intended to be found on +14U from the UID_BASE, instead of +8U. This is the case, since the reference manual defines the chip in question as a "Cat. 1 || Cat.2" device since it has 64 Kbytes of memory, seen on page 40/904. 
The base address and incrementations are defined on page 885/904.

I attempted to follow the documentation and apply +14U for the last part of the UID, however in that case the last 32 bits of the UID are the always read as "FFh FFh 11h 00h" for any chip I attempt this on. Reading the last part as UID_BASE + 8U instead yields more sensible data, where chips taken from the same batch have very similar but unique values (which might correspond to the XY coordinates on the wafer or however these UIDs are generated). 

Summarizing: Am I reading the correct addresses (UID_BASE, UID_BASE + 4U, UID_BASE + 8U), and can it really be true that two chips have the exact same UIDs? I have attached the documentation I used, as well as a screencap of the firmware section(s) which extracts these UIDs. 

Any feedback is very welcome here


2 REPLIES 2
mƎALLEm
ST Employee

Hello @Kbruhn97 and welcome to ST community,

According to the reference manual, the start address depends on the Cat number: 

mALLEm_0-1768310620360.png

For that you need to read DEV_ID field in DBGMCU_IDCODE register:

mALLEm_1-1768310755266.png

And for your question: "and can it really be true that two chips have the exact same UIDs? "

-> that's impossible that's called a unique ID. It's unique for each chip.

 

 

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.
waclawek.jan
Super User

> apply +14U

Not 14U, but 0x14.

JW