<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Unique ID on Kinetis K22 in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Unique-ID-on-Kinetis-K22/m-p/721775#M44221</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm playing around with the Unique ID embedded in the microcontrollers to be used as a serial number for my product and I just realized that although the datasheet says it's a 128 bit value, the fsl_sim.c from the SDK2.3 only uses the lower 96 bits (discards the UIDH).&lt;/P&gt;&lt;P&gt;Checking the source files, the use of the highest 32 bit alue depends on the definition of the macro&amp;nbsp;SIM_UIDH, which is not defined anywhere.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;fsl_sim.c:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;void SIM_GetUniqueId(sim_uid_t *uid)&lt;BR /&gt;{&lt;BR /&gt;&lt;STRONG&gt;#if defined(SIM_UIDH)&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; uid-&amp;gt;H = SIM-&amp;gt;UIDH;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;#endif&lt;/STRONG&gt;&lt;BR /&gt;#if (defined(FSL_FEATURE_SIM_HAS_UIDM) &amp;amp;&amp;amp; FSL_FEATURE_SIM_HAS_UIDM)&lt;BR /&gt; uid-&amp;gt;M = SIM-&amp;gt;UIDM;&lt;BR /&gt;#else&lt;BR /&gt; uid-&amp;gt;MH = SIM-&amp;gt;UIDMH;&lt;BR /&gt; uid-&amp;gt;ML = SIM-&amp;gt;UIDML;&lt;BR /&gt;#endif /* FSL_FEATURE_SIM_HAS_UIDM */&lt;BR /&gt; uid-&amp;gt;L = SIM-&amp;gt;UIDL;&lt;BR /&gt;}&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;fsl_sim.h:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;/*!@brief Unique ID. */&lt;BR /&gt;typedef struct _sim_uid&lt;BR /&gt;{&lt;BR /&gt;&lt;STRONG&gt;#if defined(SIM_UIDH)&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; uint32_t H; /*!&amp;lt; UIDH. */&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;#endif&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;#if (defined(FSL_FEATURE_SIM_HAS_UIDM) &amp;amp;&amp;amp; FSL_FEATURE_SIM_HAS_UIDM)&lt;BR /&gt; uint32_t M; /*!&amp;lt; SIM_UIDM. */&lt;BR /&gt;#else&lt;BR /&gt; uint32_t MH; /*!&amp;lt; UIDMH. */&lt;BR /&gt; uint32_t ML; /*!&amp;lt; UIDML. */&lt;BR /&gt;#endif /* FSL_FEATURE_SIM_HAS_UIDM */&lt;BR /&gt; uint32_t L; /*!&amp;lt; UIDL. */&lt;BR /&gt;} sim_uid_t;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Changing the #if&amp;nbsp;statements to&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;#if defined(SIM_UIDH_UID)&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;solves the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;BR /&gt;Bruno&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 03 May 2018 11:04:53 GMT</pubDate>
    <dc:creator>brunoalbrecht</dc:creator>
    <dc:date>2018-05-03T11:04:53Z</dc:date>
    <item>
      <title>Unique ID on Kinetis K22</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Unique-ID-on-Kinetis-K22/m-p/721775#M44221</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm playing around with the Unique ID embedded in the microcontrollers to be used as a serial number for my product and I just realized that although the datasheet says it's a 128 bit value, the fsl_sim.c from the SDK2.3 only uses the lower 96 bits (discards the UIDH).&lt;/P&gt;&lt;P&gt;Checking the source files, the use of the highest 32 bit alue depends on the definition of the macro&amp;nbsp;SIM_UIDH, which is not defined anywhere.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;fsl_sim.c:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;void SIM_GetUniqueId(sim_uid_t *uid)&lt;BR /&gt;{&lt;BR /&gt;&lt;STRONG&gt;#if defined(SIM_UIDH)&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; uid-&amp;gt;H = SIM-&amp;gt;UIDH;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;#endif&lt;/STRONG&gt;&lt;BR /&gt;#if (defined(FSL_FEATURE_SIM_HAS_UIDM) &amp;amp;&amp;amp; FSL_FEATURE_SIM_HAS_UIDM)&lt;BR /&gt; uid-&amp;gt;M = SIM-&amp;gt;UIDM;&lt;BR /&gt;#else&lt;BR /&gt; uid-&amp;gt;MH = SIM-&amp;gt;UIDMH;&lt;BR /&gt; uid-&amp;gt;ML = SIM-&amp;gt;UIDML;&lt;BR /&gt;#endif /* FSL_FEATURE_SIM_HAS_UIDM */&lt;BR /&gt; uid-&amp;gt;L = SIM-&amp;gt;UIDL;&lt;BR /&gt;}&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;fsl_sim.h:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;/*!@brief Unique ID. */&lt;BR /&gt;typedef struct _sim_uid&lt;BR /&gt;{&lt;BR /&gt;&lt;STRONG&gt;#if defined(SIM_UIDH)&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; uint32_t H; /*!&amp;lt; UIDH. */&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;#endif&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;#if (defined(FSL_FEATURE_SIM_HAS_UIDM) &amp;amp;&amp;amp; FSL_FEATURE_SIM_HAS_UIDM)&lt;BR /&gt; uint32_t M; /*!&amp;lt; SIM_UIDM. */&lt;BR /&gt;#else&lt;BR /&gt; uint32_t MH; /*!&amp;lt; UIDMH. */&lt;BR /&gt; uint32_t ML; /*!&amp;lt; UIDML. */&lt;BR /&gt;#endif /* FSL_FEATURE_SIM_HAS_UIDM */&lt;BR /&gt; uint32_t L; /*!&amp;lt; UIDL. */&lt;BR /&gt;} sim_uid_t;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Changing the #if&amp;nbsp;statements to&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;#if defined(SIM_UIDH_UID)&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;solves the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;BR /&gt;Bruno&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 May 2018 11:04:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Unique-ID-on-Kinetis-K22/m-p/721775#M44221</guid>
      <dc:creator>brunoalbrecht</dc:creator>
      <dc:date>2018-05-03T11:04:53Z</dc:date>
    </item>
    <item>
      <title>Re: Unique ID on Kinetis K22</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Unique-ID-on-Kinetis-K22/m-p/721776#M44222</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, the 128-bit unique identification (ID) number are defined with four register, named 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); Those four registers are read only register and programmed during manufacturer testing procedure. &lt;/P&gt;&lt;P&gt;Do not know why the SIM_UIDH not been defined, anyway your comments quite helpful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 May 2018 06:11:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Unique-ID-on-Kinetis-K22/m-p/721776#M44222</guid>
      <dc:creator>miduo</dc:creator>
      <dc:date>2018-05-04T06:11:36Z</dc:date>
    </item>
  </channel>
</rss>

