How to read the unique ID for K60?

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

How to read the unique ID for K60?

跳至解决方案
2,598 次查看
danielchai
Senior Contributor I

Hi All,

I know every MCU has an unique id for it. How can I get this unique id?

Thank you.

-Daniel

1 解答
1,598 次查看
albertovargas
NXP Employee
NXP Employee

Hi Daniel,

You have 4 registers that contain the Unique Identification (UID):

Unique Identification Register High: SIM_UIDH

Unique Identification Register Mid-High: SIM_UIDMH

Unique Identification Register Mid-Low: SIM_UIDML

Unique Identification Register Low: SIM_UIDL

Here is an example to get it:

printf( "CPU Unique Identifier:\n" );

printf( "0x%08X 0x%08X 0x%08X 0x%08X\n", SIM_UIDH, SIM_UIDMH, SIM_UIDML, SIM_UIDL );

在原帖中查看解决方案

4 回复数
1,598 次查看
carlos_chavez
NXP Employee
NXP Employee

Hi Daniel,

I just wanted to follow up on your question regarding the Unique ID for the K60.  The 128-bit value can be read via the following registers:

  • Unique Identification Register High (SIM_UIDH)
  • Unique Identification Register Mid-High (SIM_UIDMH)
  • Unique Identification Register Mid-Low (SIM_UIDML)
  • Unique Identification Register Low (SIM_UIDL)

Can you please tell me what mask set of the device you have, which is printed on the top of the device or what the value of the SIM_SDID[REVID] reports back?  I know that some revisions did not have this value programmed correctly.

I look forward to your response.

Best Regards,

Carlos

1,598 次查看
danielchai
Senior Contributor I

Hi Carlos,

The device I am using is MK60FN1M0VLQ12.

Thanks.

0 项奖励
回复
1,599 次查看
albertovargas
NXP Employee
NXP Employee

Hi Daniel,

You have 4 registers that contain the Unique Identification (UID):

Unique Identification Register High: SIM_UIDH

Unique Identification Register Mid-High: SIM_UIDMH

Unique Identification Register Mid-Low: SIM_UIDML

Unique Identification Register Low: SIM_UIDL

Here is an example to get it:

printf( "CPU Unique Identifier:\n" );

printf( "0x%08X 0x%08X 0x%08X 0x%08X\n", SIM_UIDH, SIM_UIDMH, SIM_UIDML, SIM_UIDL );

1,598 次查看
armaram
Contributor III

I'm trying to do the same thing without printf, using only UART_Wr, UART,PutChar, etc.

Would you know how should we do the same thing in cases where we are not allowed to use printf (mem constraints)?

0 项奖励
回复