<?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>LPC MicrocontrollersのトピックRead UID for LPC82x</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/Read-UID-for-LPC82x/m-p/1472431#M49134</link>
    <description>&lt;P&gt;Dear All,&lt;/P&gt;&lt;P&gt;Recently I started a work on LPC822 chip. In my project I would like to have a UID to identify each chip. After search from the forum I notice that I can use the IAP readUID function to achieve this.&lt;/P&gt;&lt;P&gt;In the fsl_iap of the SDK I got this part of code:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;status_t IAP_ReadUniqueID(uint32_t *uniqueID)
{
#if defined(FSL_FEATURE_IAP_READ_UNIQUE_ID_NOWORK) &amp;amp;&amp;amp; FSL_FEATURE_IAP_READ_UNIQUE_ID_NOWORK
    uint32_t *result = (uint32_t *)0x01000100;
    uint8_t i        = 0;

    for (i = 0; i &amp;lt; 4; i++)
        uniqueID[i] = result[i];
    return kStatus_IAP_Success;
#else
    uint32_t command[5] = {0x00U};
    uint32_t result[5]  = {0x00U};

    command[0] = (uint32_t)kIapCmd_IAP_ReadUid;
    iap_entry(command, result);
    uniqueID[0] = result[1];
    uniqueID[1] = result[2];
    uniqueID[2] = result[3];
    uniqueID[3] = result[4];

    return translate_iap_status(result[0]);
#endif
}&lt;/LI-CODE&gt;&lt;P&gt;What is confusing me is the usage of the define:&lt;/P&gt;&lt;PRE&gt;FSL_FEATURE_IAP_READ_UNIQUE_ID_NOWORK&lt;/PRE&gt;&lt;P&gt;Seems in the case it is defined the UID will be directly read from the reserved address. So if I define it by myself, am I able to get the correct UID without actually invoke the IAP function?&lt;/P&gt;&lt;P&gt;Thank you for your time,&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;</description>
    <pubDate>Sat, 11 Jun 2022 00:14:47 GMT</pubDate>
    <dc:creator>Athos88</dc:creator>
    <dc:date>2022-06-11T00:14:47Z</dc:date>
    <item>
      <title>Read UID for LPC82x</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Read-UID-for-LPC82x/m-p/1472431#M49134</link>
      <description>&lt;P&gt;Dear All,&lt;/P&gt;&lt;P&gt;Recently I started a work on LPC822 chip. In my project I would like to have a UID to identify each chip. After search from the forum I notice that I can use the IAP readUID function to achieve this.&lt;/P&gt;&lt;P&gt;In the fsl_iap of the SDK I got this part of code:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;status_t IAP_ReadUniqueID(uint32_t *uniqueID)
{
#if defined(FSL_FEATURE_IAP_READ_UNIQUE_ID_NOWORK) &amp;amp;&amp;amp; FSL_FEATURE_IAP_READ_UNIQUE_ID_NOWORK
    uint32_t *result = (uint32_t *)0x01000100;
    uint8_t i        = 0;

    for (i = 0; i &amp;lt; 4; i++)
        uniqueID[i] = result[i];
    return kStatus_IAP_Success;
#else
    uint32_t command[5] = {0x00U};
    uint32_t result[5]  = {0x00U};

    command[0] = (uint32_t)kIapCmd_IAP_ReadUid;
    iap_entry(command, result);
    uniqueID[0] = result[1];
    uniqueID[1] = result[2];
    uniqueID[2] = result[3];
    uniqueID[3] = result[4];

    return translate_iap_status(result[0]);
#endif
}&lt;/LI-CODE&gt;&lt;P&gt;What is confusing me is the usage of the define:&lt;/P&gt;&lt;PRE&gt;FSL_FEATURE_IAP_READ_UNIQUE_ID_NOWORK&lt;/PRE&gt;&lt;P&gt;Seems in the case it is defined the UID will be directly read from the reserved address. So if I define it by myself, am I able to get the correct UID without actually invoke the IAP function?&lt;/P&gt;&lt;P&gt;Thank you for your time,&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;</description>
      <pubDate>Sat, 11 Jun 2022 00:14:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Read-UID-for-LPC82x/m-p/1472431#M49134</guid>
      <dc:creator>Athos88</dc:creator>
      <dc:date>2022-06-11T00:14:47Z</dc:date>
    </item>
    <item>
      <title>Re: Read UID for LPC82x</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Read-UID-for-LPC82x/m-p/1476572#M49242</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;Yes, user can define UID by self , thus we don't need IAP functions.&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;
&lt;P&gt;Jun Zhang&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jun 2022 07:28:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Read-UID-for-LPC82x/m-p/1476572#M49242</guid>
      <dc:creator>ZhangJennie</dc:creator>
      <dc:date>2022-06-20T07:28:29Z</dc:date>
    </item>
    <item>
      <title>Re: Read UID for LPC82x</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Read-UID-for-LPC82x/m-p/1478333#M49281</link>
      <description>&lt;P&gt;Ok I got it.&lt;/P&gt;&lt;P&gt;Thanks for the info.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jun 2022 17:10:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Read-UID-for-LPC82x/m-p/1478333#M49281</guid>
      <dc:creator>Athos88</dc:creator>
      <dc:date>2022-06-22T17:10:10Z</dc:date>
    </item>
  </channel>
</rss>

