Identify a S32K with a unique ID

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

Identify a S32K with a unique ID

ソリューションへジャンプ
9,406件の閲覧回数
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,251件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hi [email protected],

Sorry, yes, there is actually.

pastedImage_2.png

pastedImage_3.png

Regards,

Daniel

元の投稿で解決策を見る

6 返答(返信)
9,251件の閲覧回数
gberthiaume
Contributor III

Exactly what I wanted.
Thanks a lot.

Gabriel

0 件の賞賛
返信
9,251件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hi [email protected],

Have you considered using the Program Once Field?

pastedImage_3.png

Regards,

Daniel

0 件の賞賛
返信
9,251件の閲覧回数
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,252件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hi [email protected],

Sorry, yes, there is actually.

pastedImage_2.png

pastedImage_3.png

Regards,

Daniel

8,217件の閲覧回数
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,650件の閲覧回数
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 件の賞賛
返信