This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Atmel SAM3U Read Unique Identifier

Hi. I've been trying to read the Unique ID from an Atmel (Microchip) SAM3U1C MCU. The code does seem to be working on some MCU's, but others are returning 0x00 and 0xFF in 4-bit offset intervals from the EEFC (Flash ROM) base address of 0x80000.

Here is an example of the output I get from one MCU versus another.

Executing 'FLASHD_ReadUniqueID()'
Reading the 128-bit Unique Identifier...
0x00 0x00000000
0x01 0x00000000
0x02 0x00000000
0x03 0x00000000
0x04 0xFFFFFFFF
0x05 0xFFFFFFFF
0x06 0xFFFFFFFF
0x07 0xFFFFFFFF
0x08 0x00000000
0x09 0x00000000
0x0A 0x00000000
0x0B 0x00000000
0x0C 0xFFFFFFFF
0x0D 0xFFFFFFFF
0x0E 0xFFFFFFFF
0x0F 0xFFFFFFFF
0x10 0x00000000
0x11 0x00000000
0x12 0x00000000
0x13 0x00000000
0x14 0xFFFFFFFF
0x15 0xFFFFFFFF
0x16 0xFFFFFFFF
0x17 0xFFFFFFFF
0x18 0x00000000
0x19 0x00000000
0x1A 0x00000000
0x1B 0x00000000
0x1C 0xFFFFFFFF
0x1D 0xFFFFFFFF
0x1E 0xFFFFFFFF
0x1F 0xFFFFFFFF
0x20 0x00000000
0x21 0x00000000
0x22 0x00000000
0x23 0x00000000
0x24 0xFFFFFFFF
0x25 0xFFFFFFFF
0x26 0xFFFFFFFF
0x27 0xFFFFFFFF
0x28 0x00000000
0x29 0x00000000
0x2A 0x00000000
0x2B 0x00000000
0x2C 0xFFFFFFFF
0x2D 0xFFFFFFFF
0x2E 0xFFFFFFFF
0x2F 0xFFFFFFFF
0x30 0x00000000
0x31 0x00000000
0x32 0x00000000
0x33 0x00000000
0x34 0xFFFFFFFF
0x35 0xFFFFFFFF
0x36 0xFFFFFFFF
0x37 0xFFFFFFFF
0x38 0x00000000
0x39 0x00000000
0x3A 0x00000000
0x3B 0x00000000
0x3C 0xFFFFFFFF
0x3D 0xFFFFFFFF
0x3E 0xFFFFFFFF
0x3F 0xFFFFFFFF
0x40 0x00000000
0x41 0x00000000
0x42 0x00000000
0x43 0x00000000
0x44 0xFFFFFFFF
0x45 0xFFFFFFFF
0x46 0xFFFFFFFF
0x47 0xFFFFFFFF
0x48 0x00000000
0x49 0x00000000
0x4A 0x00000000
0x4B 0x00000000
0x4C 0xFFFFFFFF
0x4D 0xFFFFFFFF
0x4E 0xFFFFFFFF
0x4F 0xFFFFFFFF
0x50 0x00000000
0x51 0x00000000
0x52 0x00000000
0x53 0x00000000
0x54 0xFFFFFFFF
0x55 0xFFFFFFFF
0x56 0xFFFFFFFF
0x57 0xFFFFFFFF
0x58 0x00000000
0x59 0x00000000
0x5A 0x00000000
0x5B 0x00000000
0x5C 0xFFFFFFFF
0x5D 0xFFFFFFFF
0x5E 0xFFFFFFFF
0x5F 0xFFFFFFFF
0x60 0x00000000
0x61 0x00000000
0x62 0x00000000
0x63 0x00000000
0x64 0xFFFFFFFF
0x65 0xFFFFFFFF
0x66 0xFFFFFFFF
0x67 0xFFFFFFFF
0x68 0x00000000
0x69 0x00000000
0x6A 0x00000000
0x6B 0x00000000
0x6C 0xFFFFFFFF
0x6D 0xFFFFFFFF
0x6E 0xFFFFFFFF
0x6F 0xFFFFFFFF
0x70 0x00000000
0x71 0x00000000
0x72 0x00000000
0x73 0x00000000
0x74 0xFFFFFFFF
0x75 0xFFFFFFFF
0x76 0xFFFFFFFF
0x77 0xFFFFFFFF
0x78 0x00000000
0x79 0x00000000
0x7A 0x00000000
0x7B 0x00000000
0x7C 0xFFFFFFFF
0x7D 0xFFFFFFFF
0x7E 0xFFFFFFFF
0x7F 0xFFFFFFFF

Executing 'FLASHD_ReadUniqueID()'
Reading the 128-bit Unique Identifier...
0x00 0x00000000
0x01 0x334B3446
0x02 0x33303120
0x03 0x37313036
0x04 0x00000000
0x05 0xFFFFFFFF
0x06 0xFFFFFFFF
0x07 0xFFFFFFFF
0x08 0xFFFFFFFF
0x09 0xFFFFFFFF
0x0A 0xFFF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FFFFF
0x4F 0xFFFFFFFF
0x50 0xFFFFFFFF
0x51 0xFFFFFFFF
0x52 0xFFFFFFFF
0x53 0xFFFFFFFF
0x54 0xFFFFFFFF
0x55 0xFFFFFFFF
0x56 0xFFFFFFFF
0x57 0xFFFFFFFF
0x58 0xFFFFFFFF
0x59 0xFFFFFFFF
0x5A 0xFFFFFFFF
0x5B 0xFFFFFFFF
0x5C 0xFFFFFFFF
0x5D 0xFFFFFFFF
0x5E 0xFFFFFFFF
0x5F 0xFFFFFFFF
0x60 0xFFFFFFFF
0x61 0xFFFFFFFF
0x62 0xFFFFFFFF
0x63 0xFFFFFFFF
0x64 0xFFFFFFFF
0x65 0xFFFFFFFF
0x66 0xFFFFFFFF
0x67 0xFFFFFFFF
0x68 0xFFFFFFFF
0x69 0xFFFFFFFF
0x6A 0xFFFFFFFF
0x6B 0xFFFFFFFF
0x6C 0xFFFFFFFF
0x6D 0xFFFFFFFF
0x6E 0xFFFFFFFF
0x6F 0xFFFFFFFF
0x70 0xFFFFFFFF
0x71 0xFFFFFFFF
0x72 0xFFFFFFFF
0x73 0xFFFFFFFF
0x74 0xFFFFFFFF
0x75 0xFFFFFFFF
0x76 0xFFFFFFFF
0x77 0xFFFFFFFF
0x78 0xFFFFFFFF
0x79 0xFFFFFFFF
0x7A 0xFFFFFFFF
0x7B 0xFFFFFFFF
0x7C 0xFFFFFFFF
0x7D 0xFFFFFFFF
0x7E 0xFFFFFFFF
0x7F 0xFFFFFFFF

Does anyone have any idea why this might be happening? Are there fake Chinese clones of this particular MCU on the market because I don't understand why it's returning 0x00000000. Also, SAM-BA is bugged if I try to read from the MCU which returns 0x00000000 from the first address location. It always seems to dump out 0xBD084798. My assumption is that it's returning within the function call and dumping the buffer offset address from SRAM it sets up (just thought I'd mention that).

Thanks.