How to read 128 bit unique device serial number of LPC546xx device?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to read 128 bit unique device serial number of LPC546xx device?

Jump to solution
1,281 Views
jbhoi
Contributor II

From LPC54628 datasheet, I can see this device have

128 bit unique device serial number for identification. 

How can I read it using code? I found the below API from fsl_iap.c but it reads only 32bits and I want 64bit or 128bit unique number. 

/*!
* brief Read unique identification.

* This function is used to read the unique id.
*
* param uniqueID store the uniqueID.
*
* retval #kStatus_IAP_Success Api was executed successfully.
*/
status_t IAP_ReadUniqueID(uint32_t *uniqueID)
{
uint32_t command[5], result[5];

command[0] = kIapCmd_IAP_ReadUid;
iap_entry(command, result);
uniqueID[0] = result[1];
uniqueID[1] = result[2];
uniqueID[2] = result[3];
uniqueID[3] = result[4];

return translate_iap_status(result[0]);
}

Labels (1)
Tags (1)
1 Solution
1,222 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi

Please check SDK demo code "iap_basic", it includes IAP_ReadUniqueID usage in main code.

Have a great day,
Jun Zhang

 

-------------------------------------------------------------------------------
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.
-------------------------------------------------------------------------------

View solution in original post

1 Reply
1,223 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi

Please check SDK demo code "iap_basic", it includes IAP_ReadUniqueID usage in main code.

Have a great day,
Jun Zhang

 

-------------------------------------------------------------------------------
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.
-------------------------------------------------------------------------------