cancel
Showing results for 
Search instead for 
Did you mean: 

How to access and use that 96-bit unique serial number in the CPU?

LMI2
Lead
Posted on October 13, 2016 at 12:01

I noticed that there is a 96 bit serial number in the CPU. At least in the 407 CPU. There is very little about it in the 202 page datasheet.

How can access it. And has anyone an idea how can I use it for CAN address. Many buses need nodes with individual address but making every board unique costs money.
11 REPLIES 11
Nesrine M_O
Lead II
Posted on October 13, 2016 at 12:44

Hi mich.lei  

Please refer to the “Device electronic signature� section, “unique device ID register (96 bits)� paragraph in your related reference manual to have idea about the 96-bit unique device identifier.

-Syrine-

Posted on October 13, 2016 at 14:36

You can access via pointers, at address for specific STM32 part

https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Is%20there%20a%20unique%20ID%20available%20to%20read%20from%20each%20MCU&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE4...

Not suitable for MAC addresses which should be purchased for issuing organization.

Not sure you can shrink them in a unique way for smaller number space, have a way to configure or program during final test. Consider OTP or option bytes.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
LMI2
Lead
Posted on October 13, 2016 at 14:41

It is not in the datasheet then. Because my reader does not find that there. Have to read some more pdfs.

LMI2
Lead
Posted on October 13, 2016 at 14:45

To Clive1:

Yes that's the problem. How to shrink it. Probably no way.  Production programmers have that function, that is change some parts of the code, I think. Making every board unique is a potential problem.

Edit: How long is the CAN address?

LMI2
Lead
Posted on October 13, 2016 at 17:06

I checked the CAN wiki page. Probably no way to fit this ID into a real world address.

Posted on October 13, 2016 at 17:16

It is not in the datasheet then. Because my reader does not find that there. Have to read some more pdfs.

As previously indicated you want the

http://www.st.com/content/ccc/resource/technical/document/reference_manual/3d/6d/5a/66/b4/99/40/d4/DM00031020.pdf/files/DM00031020.pdf/jcr:content/translations/en.DM00031020.pdf

in this case and the chapter on ''Device electronic signature'', and ''Unique device ID register (96 bits)''

Yes that's the problem. How to shrink it. Probably no way.  Production programmers have that function, that is change some parts of the code, I think. Making every board unique is a potential problem.

Well if you hash it into a smaller number space you're going to have more clashes. Make it configurable, save it in FLASH outside of the application firmware. Writing production test and programming software is part of the job, if you need to control the serial numbers and labelling, you'll need to manage that with code and databases.

I'm more familiar with MAC address assignment, CAN uses message ID's as I recall. All the devices on the bus can filter the messages they want to receive.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
daemynnur
Associate II
Posted on October 13, 2016 at 17:32

I suppose it depends on what you're doing with the CAN? & how the 96 bit unique IDs are allocated in production.

J1939 CAN protocol uses a 21 bit unique ID, so that's over 2 million possible.

& it only has to be unique withn devices of the same type on the same bus...

if the allocation of the  96 bit unique IDs is sequential, even having many devices on the  bus & just using the bottom 21 bits of the 96 bit ID, the chances of a match are pretty low. (even then you could come up with some tweak in the software so that if a clash does occur, they arbitrate using the higher bits of the 96 & one of them changes Serial no.)

daemynnur
Associate II
Posted on October 13, 2016 at 17:38

''

CAN uses message ID's as I recall. All the devices on the bus can filter the messages they want to receive.

''

FWIW,

yes, but (at least in J1939 / NMEA2000 protocols that I' familliar with) devices on the bus have an 8 bit address (which must be unique as it identifies the source of the messages), automatically allocated/checked for contention, using an address claim procedure, The address claim procedure uses a 21bit unique ID within a 64 bit data field to arbitrate between devices of the same manufacturer / type / function )

...

Posted on October 13, 2016 at 17:49

..if the allocation of the  96 bit unique IDs is sequential,..

I'm not sure ST guarantees it, the ID is subdivided into multiple fields. If you examined enough you might be able to locate a portion that truncates well. Sort of thing that might warrant an App Note??

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..