How to get the MCU unique ID for s32k344?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

How to get the MCU unique ID for s32k344?

跳至解决方案
2,496 次查看
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 项奖励
回复
1 解答
2,427 次查看
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 项奖励
回复
6 回复数
2,460 次查看
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 项奖励
回复
2,442 次查看
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 项奖励
回复
2,428 次查看
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 项奖励
回复
2,405 次查看
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

2,424 次查看
AndrewXiong
Contributor I

I get the UID, Thanks for your help!

0 项奖励
回复
2,453 次查看
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 项奖励
回复