Hi:
Could you please tell me how can I get UID on i.mx8mq platform?
I find the 3*4 bytes MAC address definition in OTP chip,But I have not found the UID field.
In my project , I need a unique ID as a identification,This unique ID cannot be modified after it leaves the factory.
Thanks a lot.
downey.
Hello
The unique ID of the i.MX8MQ according to the reference manual is located in the eFuses with the address from 0x410 to 0x420. You could find more information in the page 1377-1378 of the i.MX8MQ reference manual.
Hope this information may be useful to you.
Best regards,
Diego.
Thanks for your help.
I have found the Unique ID part in Reference Manual.
But , I'm not clear about this part with the Reference Manual:
At first, follow you mentioned above,the page 1377-1378 is about IOMUXC memory map,I haven't found the detail description of Unique_id.
Maybe you can tell me which chapter/section that you point at.
In case we refer to a different manual,My reference manual title is : i.MX 8M Dual/8M QuadLite/8M Quad Applications Processors Reference Manual Document Number: IMX8MDQLQRM Rev. 2.
(I'm not able to upload my local reference Manual because of the company's encryption system.)
and then,the table below relate to UNIQUE_ID.
The second column shows that UNIQUE_ID has 64 bits,and SJC_CHALL has 64 bits.
But the third column shows that this field(0x420) only has 32 bits,I don't know which part is of UNIQUE_ID,what does SJC_CHALL mean.
I tried to search "SJC_CHALL" and "UNIQUE_ID" in whole document,But no response.
These confuse me a lot.
I tried to use fuse cmd which provided by uboot to read the unique_id.0x420 belong to bank 0 word 2.
u-boot=> fuse read 0 2
Reading bank 0:
Word 0x00000002: 070891d6
u-boot=> fuse read 0 2 3
Reading bank 0:
Word 0x00000002: 070891d6 00000000mxc_ocotp fuse_read(): Invalid argument
ERROR
It seems that only can read 2 fuse word.
Thanks .
Best regards.
downey.
Hello
To understand how to calculate the bank and word, using the address: look at OCOTP memory map in
section 6.3.4 (OCOTP Memory Map/Register Definition) of i.MX 8M Mini Reference Manual,
Rev. 2, 08/2019 :
3035_0400 - Bank 0 Word 0
3035_0410 - Bank 0 Word 1
...
3035_0440 - Bank 1 Word 0
So, formula is as following:
Bank = (address - 0x400) / 0x40 ;
Word = [(address - 0x400) % 0x40] / 0x10 ;
In this case, you will look for the address 0x410 to 0x430:
u-boot -> fuse read 0 1 3
Hope this can help you.
Best regards,
Diego.
Thanks for your reply.
But. There must some mistake here.
I'm developing on i.mx8mq,not i.mx8mm, So we refered different reference manual.
Actual,My question is not how to caculate bank&word from OTP memory,I know how to do it.
I think there are too few information in i.mx8mq(not i.mx8mm) reference manual to guide me to get the UID.
Like:
I did not find a clear definition in the manual of which memory of the OTP chip it occupies,I think the description in the manual is ambiguous.
Whether UID is set before selling it to customers,Is it the unique ID for every board and whether it can not be modified?How many bits of the UID?
Best Regards.
downey
Hello
Unfortunately, that is all the information that we currently have regarding the unique ID. You could burn the fuses, but it could be done just once.
Best regards,
Diego.