How to get the MCU unique ID for s32k344?

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

How to get the MCU unique ID for s32k344?

Jump to solution
1,609 Views
AndrewXiong
Contributor I

Hi All,

I know every MCU has an unique id for it. How can I get this unique id?

Thank you.

0 Kudos
1 Solution
1,540 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Some important system information is stored in UTEST and its OTP, so MPU is used by default to protect the area in any new RTD project to prevent unexpected data changes.

If you want access to UTEST, you need to disable the MPU, the simplest way to do it is to comment out the code in “Project_Settings/Startup_Code/system.c- SystemInit()”

UTEST MPU SystemInit.png

View solution in original post

0 Kudos
6 Replies
1,573 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi AndrewXiong,

Here is the address of UID:0x1B000040

UID S32K3 0x1B000040.png


Best Regards,
Robin
-------------------------------------------------------------------------------
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 Kudos
1,555 Views
AndrewXiong
Contributor I

Hi,Robin,

I find this address, but when I try to do the following, the software crashes with a hard fault.

uint8 uid[8u];
C40_Ip_Read(FLS_UTEST_BLOCK_BASE_ADDR + 0x40,  sizeof(uid), uid);

What method should I  use to get the UID from this address?

Thansks.

0 Kudos
1,541 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Some important system information is stored in UTEST and its OTP, so MPU is used by default to protect the area in any new RTD project to prevent unexpected data changes.

If you want access to UTEST, you need to disable the MPU, the simplest way to do it is to comment out the code in “Project_Settings/Startup_Code/system.c- SystemInit()”

UTEST MPU SystemInit.png

0 Kudos
1,518 Views
MateoSegura413
Contributor III

For those wondering how to get this number, and still having the MPU enabled:

1. Declare an extern 64-bit integer in the System.c file mentioned in this post

2. Get the integer from memory right before enabling the MPU

MateoSegura413_0-1668105832631.png

Hope it helps

1,537 Views
AndrewXiong
Contributor I

I get the UID, Thanks for your help!

0 Kudos
1,566 Views
MateoSegura413
Contributor III

Hello, we need to know how we can get this UID from user application though. When we try to do the following, the software crashes with a hard fault

MateoSegura413_0-1668035709286.png

And using the MCAL FLS driver, I also get a hardfault

MateoSegura413_0-1668037509721.png

Any guidance on how we could get the 8 bytes of the UID?

Also, does the device's MAC have a UID as well? If so, how can we get it?

Thanks in advance!

0 Kudos