Identify a S32K with a unique ID

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

Identify a S32K with a unique ID

跳至解决方案
9,392 次查看
gberthiaume
Contributor III

Purpose:
As a firmware engineer, I want to distinguish between every one of my identical PCBs inside of my code.

Question:
Is it possible to get the unique identifier ID of an S32K?

Something like a wafer die number or an internal serial number.

Possible solutions:

1. The ARM architecture offers the CPUID register, but it doesn't contain anything unique.

2. The CSEC S32 SDK module has the CSEC_DRV_GetID function to obtain a UUID. I'm not sure exposing this UUID used in the security module is a good idea.

3. Adding a Silicon Serial Number IC like the DS2411 could be an option, but a 100% software solution would be preferable.

标签 (1)
标记 (4)
1 解答
9,237 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hi [email protected],

Sorry, yes, there is actually.

pastedImage_2.png

pastedImage_3.png

Regards,

Daniel

在原帖中查看解决方案

6 回复数
9,237 次查看
gberthiaume
Contributor III

Exactly what I wanted.
Thanks a lot.

Gabriel

0 项奖励
回复
9,237 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hi [email protected],

Have you considered using the Program Once Field?

pastedImage_3.png

Regards,

Daniel

0 项奖励
回复
9,237 次查看
gberthiaume
Contributor III

Hi danielmartynek‌,

Thanks for taking the time again for answering one of my questions.

While the Program Once Field seems great to store unique ID value, I would prefer having access to a manufacturer-defined unique value.

Here's my inspiration for this question:
How to obtain the die ID with a TI Hercules MCU:

pastedImage_1.png

Does something like this exist in the S32K register? 

Thanks again !

0 项奖励
回复
9,238 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hi [email protected],

Sorry, yes, there is actually.

pastedImage_2.png

pastedImage_3.png

Regards,

Daniel

8,203 次查看
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.pngMateoSegura413_0-1668035709286.png

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

MateoSegura413_0-1668037509721.pngMateoSegura413_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 项奖励
回复
5,636 次查看
Akash_Autoven
Contributor I

I've created the following function to read from the internal memory (Dflash and Pflash) of S32K1 devices:

void internalflash_readbytes(uint32_t _address, uint8_t *_data, uint32_t _number_of_bytes)
{
for(uint32_t i=0; i<_number_of_bytes; i++)
{
_data[i] = *(uint8_t*)(_address+i);
}
}

and then calling it as follows:

uint8_t _buffer[16]; // 16 bytes for 128bit unique ID
internalflash_readbytes(_address_to_read_from, &_buffer[0], 16);

 

Now the address you're reading from (0x1B000040) is outside the bounds of Pflash and Dflash (of S32K144 at least), and maybe that's why you're getting a hard-fault.

0 项奖励
回复