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
LMI2
Lead
Posted on October 13, 2016 at 19:53

It would be nice if count would start from zero and be sequential. I don't think it would soon be near the upper limit. But I have only one 407 card working here.

ST should say something.

jpeacock23
Associate II
Posted on October 14, 2016 at 12:30

The CAN node ID is often fixed since it can affect bus priority.  In cases where the node is the LSB of the object and is a don't care for priority the 96-bit ID can be used indirectly to generate an 8 bit node ID.  This assumes there's a dynamic address service for the protocol running on a bus management node somewhere.

Where I've seen the 96-bit ID used, in CANopen, is to hash it into a 32 bit value (use the CRC for a cheap and fast hash).  If collisions are a problem it can be minimized by limiting the hash to using the wafer and X/Y coordinates to generate the 32 bit value.  This hash is then placed in the Identity object.  The CANopen address assignment algorithm (LSS Fastscan) selects a node by Identity for the initial assignment of a node ID, where node assignment isn't fixed in advance.  This is very similar to DHCP assigning an IP address based on the hardware MAC address.

A slower version of Fastscan can use the entire 128-bit Identity object, in which case there are no collisions when it's loaded with the 96-bit ID and 32 bits from the ARM info in the Cortex M SCB.

Not sure how J1939 handles dynamic assignment, just started to look at how it works in preparation for building an Isobus stack.

As for costing money to make boards unique, no, not really.  You have to flash the memory with firmware during the assembly process.  Part of that flash process writes a data page with configuration parameters, including the CAN node if needed.  Some of the STM32 processors also have OTP flash memory for just this purpose, to write IDs for USB, CAN, RS-485, Ethernet, whatever network you're using.

  Jack Peacock