LPC51U68 Read UID

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

LPC51U68 Read UID

1,192件の閲覧回数
li-chinwang
Contributor II

I want to use readuid function to get UID via this functions.  

I use FLASHIAP_readpartid functions to get partid via this functions.

UID I read is 0xffffffff,0x0,0x0,0x0.

Part ID I read is 0x06451b68

readuid seems doesn't work correctly which return 0xffff,0x0,0x0,0x0.

status_t FLASHIAP_readuid(void)
{
//uint32_t command[5], result[4];

uid_command[0] = kIapCmd_FLASHIAP_ReadUid;
iap_entry(uid_command, uid_result);

return translate_iap_status(uid_result[0]);@
}

status_t FLASHIAP_readpartid(void)
{
//uint32_t command[5], result[4];

uid_command[0] = kIapCmd_FLASHIAP_ReadPartId;
iap_entry(uid_command, uid_result);

return translate_iap_status(uid_result[0]);
}

0 件の賞賛
3 返答(返信)

973件の閲覧回数
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Li-Chin Wang,

Thanks for contacting our technical support.

The read UID ISP command and IAP command can't used on LPC51u68,

the Errata of LPC51u68 https://www.nxp.com/docs/en/errata/ES_LPC51U68.pdf  

3.1 ISP.1: ISP (In-System Programming) command for UID (unique identification number) is not functional.

mentioned ISP read UID command can't use, in fact, IAP read UID also can't use.

Workaround: directly read the address 0x0100 0100, for example the below code:

volatile uint32_t mem[4] = {0};
uint32_t *uint32_point=0x01000100;

    for(uint32_t i=0; i<4; i++)
       {
           mem[i]=*(uint32_point);
           uint32_point++;
           __asm("nop");
       }


Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 件の賞賛

973件の閲覧回数
li-chinwang
Contributor II

I have try workaround and get 4 word unique numbers.

Will these 4 word numbers are unique if this function is run in different LPC51U68?

0 件の賞賛

973件の閲覧回数
converse
Senior Contributor V

No. the single 128-bit value will be unique, not the 4 individual 32-bit values.

0 件の賞賛