How to read the unique ID for K60?

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

How to read the unique ID for K60?

ソリューションへジャンプ
2,193件の閲覧回数
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,193件の閲覧回数
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,193件の閲覧回数
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,193件の閲覧回数
danielchai
Senior Contributor I

Hi Carlos,

The device I am using is MK60FN1M0VLQ12.

Thanks.

0 件の賞賛
1,194件の閲覧回数
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,193件の閲覧回数
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 件の賞賛