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,
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?
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];
}
}
Hi @pb632146,
Can you read the ID with the debugger:
Can you confirm you have the right MCUs in these registers:
Thank you,
Regards,
Daniel
Hello Yes I can see the id if i look at it with the debugger
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.
Sorry I mistakenly said 344 its a 342