How to get the board's serial number? (UC3)

18 posts / 0 new
Last post
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I was told that each UC3 board has a unique serial number. How do I get it in software? Thanks.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It would help if you give an example of such a UC3 board.

The processor has system-registers which identify the type of cpu, revision and available features.
There is no unique serial number in the processor.

Some Atmel serial flash-memory chips have a unique ID. (eg the AT45DB321)

<p>Datasheets [b]are[/b] your best friends. ([size=9]but always check the errata[/size])</p>

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

mikech wrote:
There is no unique serial number in the processor.
I disagree:
AT32UC3A3/A4 datasheet wrote:
12.10 Serial number in the factory page
Each device has a unique 120 bits serial number located in the factory page and readable from address 0x80800204 to 0x80800212.
AT32UC3B0/B1 datasheet wrote:
14.11 Serial Number
Each device has a unique 120 bits serial number readable from address 0x80800204 to 0x80800212.
AT32UC3C0/C1/C2 datasheet wrote:
15.11 Serial Number
Each device has a unique 120 bits serial number readable from address 0x80800284 to 0x80800292.
AT32UC3L0 datasheet wrote:
8.11 Serial Number
Each device has a unique 120 bits serial number readable from address 0x8080010C to 0x8080011A.
The only exception is the AT32UC3A0/A1 datasheet, which doesn’t mention a serial number.

I’ve tried it on the A3 and while several of the 15 bytes are identical between devices, none of my 16 A3 devices have all 15 bytes identical, so I assume the serial numbers to be unique.

Edit: The position of the L0’s serial number was changed in the latest datasheet revision.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hey catweax,

Thanks a lot for this info, has been really helpful for me!!

Daniel Campora
http://www.lear.com

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You can do this in AT32UC3A3/A4

unsigned int UniqID[4];
getID(UniqID);

void getID(unsigned int *ID)
{
	volatile unsigned int *ptr_ID = 0x80800204;
		
	for (int i=0; i<4;i++)
	{
		ID[i] = *ptr_ID;
		ptr_ID++;
	}
	ID[3] = ID[3]>>16;
}
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Or simply:

void getID(void *ID) {
   memcpy(ID, (void *)0x80800204, 15);
}

Daniel Campora
http://www.lear.com

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks for posting your function, makes it very fast to implement. At least three units I have tested here has uniq IDs. Do the numbers mean anything? Two of the chips has pretty similar number and they were both bought at the same time and are both TQFP. The third is BGA and has quite a lot more differance.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

AgwanII wrote:
At least three units I have tested here has uniq IDs. Do the numbers mean anything?
The XMEGA datasheet sheds some light on this:
AVR XMEGA A Manual wrote:
The serial number consist of the production LOT number, wafer number, and wafer coordinates for the device.
Can’t remember where I got that information from, but in my XMEGA code I read 6 bytes LOT number, 1 byte wafer number, 1 uint16 X coordinate and 1 uint16 Y coordinate. I also read 3 bytes device ID and 1 byte revision ID, resulting in 15 bytes. That’s exactly as long as the AVR32 serial number. Hmm.... ;-)

I just checked a bunch of AT32UC3A3256s:

996365DF3953343538372020FF151C
E08DDEBF3953343538372020FF1500
0B1FDBE23953343538372020FF160A
39D0B89F3953343538372020FF101F
5EDDAA2E3953343538372020FF0F0C
D1F68C833953343538372020FF1217
 d d d d i i i i i i i i i d d
420878AE3950303239342020FF061C
 d d d d i d d d d d i i i d d

The first six are from the same order: Four differing bytes, nine identical, then another two differing bytes.
The last one is from an earlier order and has more differing bytes, but some of them are similar to the identical ones from the other batch.

Maybe this information is useful for someone.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well., I just learned something., to be more specific about which UC3A processor I am talking about !

The UC3A0xxx/1xxx do not have a serial number and I misread the UC3B0/1 blurb and thought that the serial number was in the rewritable userpage.

Sorry.

<p>Datasheets [b]are[/b] your best friends. ([size=9]but always check the errata[/size])</p>

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

@mikech, I - the OP - learned the same thing. I also learned 1) the answer to my question, and 2) that other people want to know this too.

This is my first post here (unlikely to be my last) and I am very impressed by the response. Thanks a 1,000,000 everyone!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I think it is very good manners to explain how a problem was solved when it has been. Does not matter if you solved it your self or if you solved it getting help. As you say jamawg, other people might want to know too, and that is what this forum is for.

Back to the subject of this thread. Is it not possible to just define a variable placed into that position of the memory? Something like this:

volatile unsigned int *HardWareID = ((void *)0x80800204);

Pages