12
\$\begingroup\$

Are there systems available in large scale manufacturing that allow a unique serial number to be programmed into the firmware or some free memory space for each PCB that comes through?

I've found that the FDA has decided to start enforcing it for medical grade devices, but is this something that is easy to accomplish or would it require developing your own manufacturing process?

\$\endgroup\$
2
  • 7
    \$\begingroup\$ What kind of system do you have? Many CPUs (and higher-end MCUs) already have some sort of ID register pre-programmed with a unique value. \$\endgroup\$ Commented Jun 7, 2017 at 10:03
  • 4
    \$\begingroup\$ First check your MCU does not already have a unique identifier \$\endgroup\$
    – Jeroen3
    Commented Jun 7, 2017 at 10:58

10 Answers 10

15
\$\begingroup\$

Most production programmers are capable of inserting a unique serial number into the programmed memory, its a process normally called serialization. This is a grab of the Serialization screen from an old Dataman programmer.

serialization display from Dataman programmer

\$\endgroup\$
1
  • \$\begingroup\$ serialization is a possibility but requires extreme care especially if the range of values cross a word boundary. If you outsource programming it becomes even more tricky - had a well known vendor get this wrong not once but twice in a row, before finally admitting that their programmer for the part in question couldn't serialize over multiple bytes. Ended up sending them a unique file for each value of the more significant byte, for each of which they ran a unique 256-piece programming job serializing the lower. For the next design we built a custom programmer. \$\endgroup\$ Commented Jun 7, 2017 at 20:14
15
\$\begingroup\$

You may be asking about a software-only solution but if you are able to add a cheap IC to your board, you can use a 'Silicon Serial Number' chip.

These are tiny ROM chips that each device contains a unique binary number. Examples are Maxim's DS2401 (1-wire bus) and DS28CM00 (I2C) which have a 48-bit unique number.

The number is unique amongst the all the ICs made of that part number by that manufacturer. It's not unique amongst all the SSN chips made by everybody in the world, obviously. But they make it very easy to pick a device for your board and know that each board ever made will read a different and unique number from it.

\$\endgroup\$
4
  • 1
    \$\begingroup\$ That's quite possibly the best vendor lock-in approach I've ever seen. \$\endgroup\$
    – Basic
    Commented Jun 7, 2017 at 22:58
  • \$\begingroup\$ "not unique amongst all the SSN chips made by everybody in the world, obviously" Why should this be "obvious"? Other identifiers intended to be globally unique, e.g. Ethernet MAC addresses, accomplish it using prefix allocation -- the vendor uses their prefix and then chooses the remaining bits/digits. \$\endgroup\$
    – Ben Voigt
    Commented Jun 8, 2017 at 3:11
  • 1
    \$\begingroup\$ @BenVoigt MAC addresses are not globally unique. Just regionally unique. It is possible to come to Asia and buy a device with a MAC address which will clash with a device in Europe. Heck, on a lot of devices you can even change your MAC address to deliberately clash with a device you have. \$\endgroup\$
    – slebetman
    Commented Jun 8, 2017 at 5:28
  • \$\begingroup\$ Hi @BenVoigt, many SSN IC families exist, many processors/MCUs have unique IDs, they are only unique to IC family. How many globally-unique IC numbering schemes can you list? (not product numbering like IMEI) \$\endgroup\$
    – TonyM
    Commented Jun 8, 2017 at 5:35
5
\$\begingroup\$

yes, certainly, as mentioned mac addresses are an obvious one, usually in a flash/eeprom next to the mac if it is a separate part, or in a flash/eeprom elsewhere. vital product data (board serial number, etc) can be placed in a separate eeprom or flash or in the same device used to store other firmware.

When you have a situation for example where field upgrades of the firmware are possible, part of the system design, you dont want the VPD data erased when the firmware flash is erased and reprogrammed, so you need to solve that by either using write protect features of the flash device (putting the VPD in its on bank/area and locking that area), and not necessarily publishing/documenting publicly how to release the write protect pin and/or some other solution such that you can program the VPD in mfg and then keep it locked otherwise (a pull down/up as required then when programmed during/around ICT that fixture can pull it the other way).

It is probably more common than you think, medical is but a very very tiny subset of folks that would do this. Maybe not a television remote control but probably a mouse or keyboard and certainly a cell phone, etc.

If/when a sticker is also used on the board, you may find it has a barcode, so that during manufacturing the fixture or operator can scan the barcode, assembly rev, etc and add that to the VPD for that board.

\$\endgroup\$
1
  • \$\begingroup\$ if you have designed for field upgrades then you at least want to know what version firmware you have which is simply compiled into the firmware, but before doing the in field upgrade you may need to know what specific platform/board this is (to check for/use the right firmware and/or nuances of field programming, etc) so not only do you want to protect the VPD you may NEED the VPD information as part of the design to allow for that firmware upgrade. \$\endgroup\$
    – old_timer
    Commented Jun 7, 2017 at 9:45
3
\$\begingroup\$

Having unique codes for every product is well possible and doable. One way to do it would be to have a software programming system which sequentially changes the firmware identification number for every device programmed. With some systems this is easy to do; some micro controllers for example, have a reserved eeprom location specifically for storing an ID.

Another alternative would be to add a unique hardware ID. An example of this is a Dallas Semi (now Maxim Integrated) silicon serial number integrated circuit (DS2401). This device gives you a serial number and you are guaranteed that it will be unique. This serial number can be used to infer a unique address for a specific product.

\$\endgroup\$
2
\$\begingroup\$

Mass produced network cards are having their serial numbers in the form of hardware (MAC) address programmed into their flash/EEPROM during manufacturing.

While serial numbers applied onto the product casing as sticker can be removed or reapplied, having serial number burned into the specific board raises another way to track board's usage; most probably this serial number will also be printed onto the medical documentation to track which exactly device was used for medical diagnosis or operation.

\$\endgroup\$
2
\$\begingroup\$

...is this something that is easy to accomplish or would it require developing your own manufacturing process?

About 10 years ago, I was in similar situation with a medical device firmware which I've developed for one of my clients. This was a Class 2 device, which raised the bar. The production quantities were in hundreds.

We couldn't find an off-the-shelf programmer which could write serial numbers automatically or semi-automatically. We did a workaround. We had a factory firmware which was used for calibration and testing. This factory firmware communicated with the rest of the test equipment through a serial port. As a part of this testing, we would download the serial number, which was stored in the microcontroller's EEPROM. (The factory firmware was overwritten by the field firmware.)

\$\endgroup\$
0
\$\begingroup\$

SEGGER production programmers support flashing of unique serial numbers into MCUs.

\$\endgroup\$
0
\$\begingroup\$

If you have many options for this (some grabbed from this answer):

  1. Use your microcontroller's unique ID if available.
  2. Select a unique address by setting some external jumpers on dedicated I/Os.
  3. Program a UID to flash or EEPROM during production. The firmware file itself can be changed through serialization. If your assembly line doesn't have this feature but you can customize it, it's easy to do by locating the offset of the firmware file with a hex editor and using your favorite script/language to modify the file. Sometimes you can "fix" this address with the linker script.
  4. Inferface an external chip that provides a UID.
  5. Configure the internal flash/eeprom (if available) with your service interface or bootloader. This may be even done during testing (not exactly in the "production line" in some cases). Some devices have this service interface where only the manufacturer of authorized technicians can change some values. Since this value should be unmodifiable, make sure the code flags modified values and forbid further modifications. If you have a bootloader, make sure this section isn't overwrited in field upgrades.
\$\endgroup\$
0
\$\begingroup\$

If you have access to a good hardware RNG and 16 bytes of extra persistent storage, one way that doesn't involve changing your production process too much is to generate a v4 GUID on first startup and store it. You can have the firmware dump it to serial during whatever post-programming tests you run. It's not sequential, but that doesn't matter for most applications.

\$\endgroup\$
0
\$\begingroup\$

If the use of an RFID or Smart Tag on each PCB meets the requirement, it will be the easiest method of implementation - under your control.

\$\endgroup\$

Not the answer you're looking for? Browse other questions tagged or ask your own question.