Electrical – Unique Serial Number for Atmel SAM Series

microcontrollerpcb-designserial number

My aim is to acquire a unique serial number for my design and reuse it as an ID in different places for my Radio communication. I have used an Atmel SAM D21 series microcontroller on my design which on the 1st sight seemed to have a serial number when I followed the following path in Atmel Studio.

Menu > Tools > Device Programming > Device Information

But no traces of any serial numbers of any sort. Just a Device Signature which repeats on all the MCUs.

I am aware that we could use a Dallas One Wire Serial chip for this purpose and apparently some AVR series have an accessible serial number in them, but in the favor of reducing the BOM and the choice of MCU I am trying not to go that way.

In the meanwhile, even though that I haven't used the feature myself, I know that SAM D series have an integrated USB module in them. Considering that every USB module should have a unique serial number (unless I am wrong), is there a method to extract that SN?

Please let me know if there are any solutions you have in mind for this purpose.

Best Answer

The SAMD21 processors do indeed have a unique ID, as explained in the "Serial Number" section in the "Memories" chapter in the Atmel SAMD21 datasheet. (This is currently section 10.3.3, page 46). The datasheet states

Each device has a unique 128-bit serial number which is a concatenation of four 32-bit words contained at the following addresses:
Word 0: 0x0080A00C
Word 1: 0x0080A040
Word 2: 0x0080A044
Word 3: 0x0080A048
The uniqueness of the serial number is guaranteed only when using all 128 bits.

USB devices are expected but not required to provide a serial number, but I am not aware of any microcontroller USB peripheral that incorporates a serial number directly—all the USB peripherals I know of merely allow the processor, if desired, to provide the serial number as part of the descriptor.