S32k344 Getting UID, 6 255s?

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

S32k344 Getting UID, 6 255s?

315 Views
pb632146
Contributor V

I am trying to follow https://community.nxp.com/t5/S32K/How-to-get-the-MCU-unique-ID-for-s32k344/m-p/1550028 to obtain a unique identifier per board. However when I get the data i get 2 bytes of actual data then 6 bytes of 255s, and the 2 bytes of actual numbers had 2 duplicates between 3 boards of 31 101 255 255 255 255 255 255, 

pb632146_1-1744335388886.png

https://community.nxp.com/t5/S32K/Identify-a-S32K-with-a-unique-ID/td-p/1027620 I have also seen this post about the SIM memory map but if I try to access those memory locations then the debugger fails to even launch let alone hard fault.

 

How do I properly obtain a serial/identification for each board that comes pre assigned?

0 Kudos
Reply
3 Replies

219 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hello @pb632146,

You use an 32bit pointer to read the 8bit data without any casting.

Can you try something like this:

void read_id(uint8_t *source, uint8_t *destination) {
    for (int i = 0; i < 8; i++) {
        destination[i] = source[i];
    }
}
0 Kudos
Reply

288 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @pb632146,

Can you read the ID with the debugger:

danielmartynek_0-1744613993977.png

danielmartynek_1-1744614026251.png

 

Can you confirm you have the right MCUs in these registers:

danielmartynek_2-1744614190074.png

 

Thank you,

 

Regards,

Daniel

 

0 Kudos
Reply

240 Views
pb632146
Contributor V

Hello Yes I can see the id if i look at it with the debugger

pb632146_0-1745189449944.png

pb632146_2-1745189597456.png

pb632146_3-1745189608907.png

 

It appears to get the first byte correct but then the 2nd byte is incorrect and the rest of it is 255s

 

Using memcpy seems to work though.

Trying to read 40290000 does not return anything though.

pb632146_1-1745189516004.png

Sorry I mistakenly said 344 its a 342

 

0 Kudos
Reply