Hello,
I have a problem with the imx51, I can not find in RM register where serial number is stored, can someone help me?
--
thx Lukasz
Solved! Go to Solution.
64bits unique id addresses: 820-83c Table 6-2. i.MX51 Fuse Map
http://www.freescale.com/files/dsp/doc/ref_manual/MCIMX51RM.pdf
Best regards
igor
64bits unique id addresses: 820-83c Table 6-2. i.MX51 Fuse Map
http://www.freescale.com/files/dsp/doc/ref_manual/MCIMX51RM.pdf
Best regards
igor
Thank you very much!
--
Lukasz
Hello, Lucasz!
Follow my code for iMX53:
/*
* i.MX53 Applications Processor Reference Manual, Rev. 2.1, 5/2012
* Table 2-10. Common Fusemap, p. 5088
*/
int cpu_id(unsigned int * __restrict m,
unsigned int * __restrict l)
{
int fd = -1;
unsigned char v[8] = {0}, i;
fd = open("/dev/mxc_iim", O_RDONLY);
if (fd <= 0)
return -1;
for (i = 0; i < 8; i++) {
if (-1 == lseek(fd, 0x820 + i * 4, SEEK_SET))
goto ERROR;
if (-1 == read(fd, &v[i], sizeof(char)))
goto ERROR;
}
close(fd);
*m = (unsigned int)((v[0] << 24) | (v[1] << 16) |
(v[2] << 8) | (v[3] << 0));
*l = (unsigned int)((v[4] << 24) | (v[5] << 16) |
(v[6] << 8) | (v[7] << 0));
return 0;
ERROR:
close(fd);
return -1;
}