<?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 Chip_IAP_ReadUID() code has a bug? Yes. in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/Chip-IAP-ReadUID-code-has-a-bug-Yes/m-p/814813#M32665</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The user manual says this:&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="81"&gt;&lt;SPAN class=""&gt;Return Code &lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="550"&gt;&lt;SPAN class=""&gt;CMD_SUCCESS followed by four 32-bit words of a unique serial number in ASCII format. The word sent at the lowest address is sent first&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the code in the LPC5411x package is this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: andale mono, monospace; font-size: 15px;"&gt;/* Read the unique ID */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono, monospace; font-size: 15px;"&gt;uint32_t Chip_IAP_ReadUID(void)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono, monospace; font-size: 15px;"&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono, monospace; font-size: 15px;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;uint32_t command[5], result[4];&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: andale mono, monospace; font-size: 15px;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;command[0] = IAP_READ_UID_CMD;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono, monospace; font-size: 15px;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;iap_entry(command, result);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: andale mono, monospace; font-size: 15px;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;return result[1];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono, monospace; font-size: 15px;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;I'm not sure is that's just buggy code that just keeps floating around, but it clearly won't work. Digging around in the forums I see that this exist in several LPCOpen packages.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 02 Aug 2018 20:56:15 GMT</pubDate>
    <dc:creator>chrispflieger</dc:creator>
    <dc:date>2018-08-02T20:56:15Z</dc:date>
    <item>
      <title>Chip_IAP_ReadUID() code has a bug? Yes.</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Chip-IAP-ReadUID-code-has-a-bug-Yes/m-p/814813#M32665</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The user manual says this:&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="81"&gt;&lt;SPAN class=""&gt;Return Code &lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="550"&gt;&lt;SPAN class=""&gt;CMD_SUCCESS followed by four 32-bit words of a unique serial number in ASCII format. The word sent at the lowest address is sent first&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the code in the LPC5411x package is this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: andale mono, monospace; font-size: 15px;"&gt;/* Read the unique ID */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono, monospace; font-size: 15px;"&gt;uint32_t Chip_IAP_ReadUID(void)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono, monospace; font-size: 15px;"&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono, monospace; font-size: 15px;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;uint32_t command[5], result[4];&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: andale mono, monospace; font-size: 15px;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;command[0] = IAP_READ_UID_CMD;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono, monospace; font-size: 15px;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;iap_entry(command, result);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: andale mono, monospace; font-size: 15px;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;return result[1];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: andale mono, monospace; font-size: 15px;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;I'm not sure is that's just buggy code that just keeps floating around, but it clearly won't work. Digging around in the forums I see that this exist in several LPCOpen packages.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Aug 2018 20:56:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Chip-IAP-ReadUID-code-has-a-bug-Yes/m-p/814813#M32665</guid>
      <dc:creator>chrispflieger</dc:creator>
      <dc:date>2018-08-02T20:56:15Z</dc:date>
    </item>
    <item>
      <title>Re: Chip_IAP_ReadUID() code has a bug?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Chip-IAP-ReadUID-code-has-a-bug-Yes/m-p/814814#M32666</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'd appreciate if anyone could tell me how to actually read the UID from the part.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to look at the result register (uint32_t [4]) and got:&lt;/P&gt;&lt;P&gt;0x0&lt;/P&gt;&lt;P&gt;0xFFFF&lt;/P&gt;&lt;P&gt;0x0&lt;/P&gt;&lt;P&gt;0x0&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Aug 2018 15:10:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Chip-IAP-ReadUID-code-has-a-bug-Yes/m-p/814814#M32666</guid>
      <dc:creator>chrispflieger</dc:creator>
      <dc:date>2018-08-03T15:10:52Z</dc:date>
    </item>
    <item>
      <title>Re: Chip_IAP_ReadUID() code has a bug? Yes.</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Chip-IAP-ReadUID-code-has-a-bug-Yes/m-p/814815#M32667</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chris,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; This is not the code problem, it is the same as the ISP UID read problem.&lt;/P&gt;&lt;DIV class=""&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; padding: 0px;"&gt;This is a known issue and documented in the LPC5411x Errata sheet.&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px; padding: 0px;"&gt;The workaround documented in the Errata sheet:-&lt;/P&gt;&lt;P class="" style="color: #51626f; background-color: #ffffff; border: 0px; padding: 0px;"&gt;The unique serial number (four 32-bit words) can be directly read from address locations&lt;/P&gt;&lt;P class="" style="color: #51626f; background-color: #ffffff; border: 0px; padding: 0px;"&gt;0x0100 0100 to 0x0100 010C&lt;/P&gt;&lt;P class="" style="color: #51626f; background-color: #ffffff; border: 0px; padding: 0px;"&gt;&lt;/P&gt;&lt;P class="" style="color: #51626f; background-color: #ffffff; border: 0px; padding: 0px;"&gt;Wish it helps you!&lt;/P&gt;&lt;P class="" style="color: #51626f; background-color: #ffffff; border: 0px; padding: 0px;"&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Kerry&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Aug 2018 10:06:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Chip-IAP-ReadUID-code-has-a-bug-Yes/m-p/814815#M32667</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2018-08-06T10:06:44Z</dc:date>
    </item>
  </channel>
</rss>

