Easy Way to Read UID(Unique ID) on i.MX53

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Easy Way to Read UID(Unique ID) on i.MX53

跳至解决方案
2,416 次查看
ricardo_ioct
Contributor III

Greetings,

I',m working on a i.MX53-based board, running linux(BSP 11.09). Lately, I'm with the requirement of obtain an identificator that must be unique to every board. I've been searching, and I notice the IIM module on Reference Manual, that claims to have a UID(Unique ID) information, but I can't figure out how to obtain it. I've tried to use this kernel module(mxc_iim), but it don't seems to access the UID information. Apparently, this module only access the IIM's Control Registers. Anybody could help me telling me an easy way to access this UID?

Thanks in advance

Ricardo Gurgel.

标签 (2)
0 项奖励
1 解答
1,448 次查看
Yuri
NXP Employee
NXP Employee

It is possible to use mxc_iim_test application :

Offset from IIM base address 0x820 corresponds UNIQUE_ID[63:56] ...

Offset from IIM base address 0x83C corresponds UNIQUE_ID[7:0]

So, to read UNIQUE_ID[63:56] :

#sudo ./mxc_iim_test.out read -d 0x820

to read UNIQUE_ID[7:0] :

#sudo ./mxc_iim_test.out read -d 0x83C

在原帖中查看解决方案

0 项奖励
5 回复数
1,448 次查看
ricardo_ioct
Contributor III

Indeed, I've notice that my documentation wasn't the last revision. Based on the Yuri's hint, I wrote a c++ class that returns me the entire UID. Thank you everybody!

Regards,

Ricardo Sousa

0 项奖励
1,449 次查看
Yuri
NXP Employee
NXP Employee

It is possible to use mxc_iim_test application :

Offset from IIM base address 0x820 corresponds UNIQUE_ID[63:56] ...

Offset from IIM base address 0x83C corresponds UNIQUE_ID[7:0]

So, to read UNIQUE_ID[63:56] :

#sudo ./mxc_iim_test.out read -d 0x820

to read UNIQUE_ID[7:0] :

#sudo ./mxc_iim_test.out read -d 0x83C

0 项奖励
1,448 次查看
ricardo_ioct
Contributor III

Interesting, Yuri Muhin!

So, I just need to read from 0x820 to 0x83c address to obtain the full 64-bit UID? That's right? Just for curiosity, where in the world did you find this information? It's pretty hard to find it on i.MX53 documentation.

Regards,

Ricardo Gurgel.

0 项奖励
1,448 次查看
fabio_estevam
NXP Employee
NXP Employee

Please download the latest mx53 reference manual from freescale.com and take a look at the last chapter called "

Addendum to Rev. 2 of the i.MX53 Applications Processor Reference Manual"

,and it contains the fuse map.

Table 2-10 at page 13 shows the UUID registers as mentioned by Yuri.

1,448 次查看
richard1094
Contributor III

dd if=/dev/mxc_iim of=/tmp/cpuid0.txt bs=1 skip=2064 count=1

dd if=/dev/mxc_iim of=/tmp/cpuid1.txt bs=1 skip=2068 count=1

dd if=/dev/mxc_iim of=/tmp/cpuid2.txt bs=1 skip=2072 count=1

dd if=/dev/mxc_iim of=/tmp/cpuid3.txt bs=1 skip=2076 count=1

dd if=/dev/mxc_iim of=/tmp/cpuid4.txt bs=1 skip=2080 count=1

dd if=/dev/mxc_iim of=/tmp/cpuid5.txt bs=1 skip=2084 count=1

dd if=/dev/mxc_iim of=/tmp/cpuid6.txt bs=1 skip=2088 count=1

dd if=/dev/mxc_iim of=/tmp/cpuid7.txt bs=1 skip=2092 count=1

dd if=/dev/mxc_iim of=/tmp/cpuid8.txt bs=1 skip=2096 count=1

dd if=/dev/mxc_iim of=/tmp/cpuid9.txt bs=1 skip=2100 count=1

dd if=/dev/mxc_iim of=/tmp/cpuid10.txt bs=1 skip=2104 count=1 

dd if=/dev/mxc_iim of=/tmp/cpuid11.txt bs=1 skip=2108 count=1