<?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 Re: JN518x: How to read &amp;quot;Config&amp;quot; memory? in Wireless MCU</title>
    <link>https://community.nxp.com/t5/Wireless-MCU/JN518x-How-to-read-quot-Config-quot-memory/m-p/1386900#M12551</link>
    <description>&lt;P&gt;My question is how to read it from "&lt;STRONG&gt;firmware C code&lt;/STRONG&gt;".&lt;/P&gt;&lt;P&gt;I already used DK6Programmer many times and works fine, but I can't find anything by C code. (checked User Manual and header files...).&lt;/P&gt;</description>
    <pubDate>Wed, 15 Dec 2021 04:19:36 GMT</pubDate>
    <dc:creator>usaygo</dc:creator>
    <dc:date>2021-12-15T04:19:36Z</dc:date>
    <item>
      <title>JN518x: How to read "Config" memory?</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/JN518x-How-to-read-quot-Config-quot-memory/m-p/1380497#M12479</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;We can&amp;nbsp; read "Config" memory area by DK6Programmer, however I could not find information how to read them from the firmware. Is it mapped to some address?&lt;/P&gt;&lt;P&gt;I want to read the factory MAC address which is located in "Config" memory area. After programming 154_cmac0, vMMAC_GetMacAddress() will refer to 154_cmac0. How do I read factory MAC address?&lt;/P&gt;&lt;P&gt;Note: my program does not use ZigBee3.0 stack, but use MMAC and low level APIs only.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 02 Dec 2021 09:07:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/JN518x-How-to-read-quot-Config-quot-memory/m-p/1380497#M12479</guid>
      <dc:creator>usaygo</dc:creator>
      <dc:date>2021-12-02T09:07:51Z</dc:date>
    </item>
    <item>
      <title>Re: JN518x: How to read "Config" memory?</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/JN518x-How-to-read-quot-Config-quot-memory/m-p/1380807#M12482</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/188667"&gt;@usaygo&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;You could read it, one method is to use pFLASH read API(psector_ReadData) in your application to read all pFLASH content and then print it.&lt;/P&gt;
&lt;P&gt;For the memory map of the pFLASH, you can check structure pflash within in struct psector_page_data_t that defined in rom_psectr.h.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Mario&lt;/P&gt;</description>
      <pubDate>Thu, 02 Dec 2021 18:07:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/JN518x-How-to-read-quot-Config-quot-memory/m-p/1380807#M12482</guid>
      <dc:creator>mario_castaneda</dc:creator>
      <dc:date>2021-12-02T18:07:26Z</dc:date>
    </item>
    <item>
      <title>Re: JN518x: How to read "Config" memory?</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/JN518x-How-to-read-quot-Config-quot-memory/m-p/1380889#M12486</link>
      <description>&lt;P&gt;Hello and Thanks for reply,&lt;/P&gt;&lt;P&gt;I already did read the pFlash area, however it does not seem to contain "Config" area.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;9e000: 00 80 00 04 e8 01 00 03 : 2d 01 00 03 31 01 00 03
9e010: 35 01 00 03 81 0e 00 03 : 3d 01 00 03 19 e1 09 00
9e020: 14 00 00 cc 00 00 00 00 : 00 00 00 00 85 5e 00 03
...
9ec50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
9ec60: {154_cmac0} ........    : {154_cmac1}
9ec70: {ble_cmac0}             : {ble_cmac1}
9ec80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
... // there is same data.
9ee50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
9ee60: {154_cmac0} ........    : {154_cmac1}
9ee70: {ble_cmac0}             : {ble_cmac1}
9ee80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
...
9eff0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
9f &amp;lt;hungs here, cannot read from x9f000&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the "Config" area is&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;$ DK6Programmer.exe -V 0 -s COM4 -r Config:128
  COM4: Connected at 115200
  COM4: Detected JN5189 with MAC address 00:15:8D:00:05:B0:EA:86
  COM4: Selected memory: Config
  COM4: Reading 128 bytes from Config at 00000000
  COM4: Config = a41c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ca0100000000000000000000000000d054375254373432423030302e0000000045140080ca000000d83b3401ce870200[86eab005008d1500:Factory MAC]0000000000000000&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any idea to read factory MAC?&lt;/P&gt;</description>
      <pubDate>Fri, 03 Dec 2021 00:59:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/JN518x-How-to-read-quot-Config-quot-memory/m-p/1380889#M12486</guid>
      <dc:creator>usaygo</dc:creator>
      <dc:date>2021-12-03T00:59:48Z</dc:date>
    </item>
    <item>
      <title>Re: JN518x: How to read "Config" memory?</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/JN518x-How-to-read-quot-Config-quot-memory/m-p/1385212#M12536</link>
      <description>&lt;P&gt;still waiting for a way to read "&lt;STRONG&gt;Config&lt;/STRONG&gt;" area (&lt;EM&gt;not "pFlash"&lt;/EM&gt;) from firmware code.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Dec 2021 00:31:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/JN518x-How-to-read-quot-Config-quot-memory/m-p/1385212#M12536</guid>
      <dc:creator>usaygo</dc:creator>
      <dc:date>2021-12-13T00:31:37Z</dc:date>
    </item>
    <item>
      <title>Re: JN518x: How to read "Config" memory?</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/JN518x-How-to-read-quot-Config-quot-memory/m-p/1386687#M12547</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/188667"&gt;@usaygo&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;You could type the next command to read out the config data using the DK6Programmer.&lt;/P&gt;
&lt;P&gt;DK6Programmer.exe -V5 -s COM18 -r config&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mario_castaneda_0-1639510949712.png" style="width: 475px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/165184iF3005C0D60D2E145/image-dimensions/475x228?v=v2" width="475" height="228" role="button" title="mario_castaneda_0-1639510949712.png" alt="mario_castaneda_0-1639510949712.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Please let m e know if you have any further questions.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Mario&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Dec 2021 19:44:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/JN518x-How-to-read-quot-Config-quot-memory/m-p/1386687#M12547</guid>
      <dc:creator>mario_castaneda</dc:creator>
      <dc:date>2021-12-14T19:44:42Z</dc:date>
    </item>
    <item>
      <title>Re: JN518x: How to read "Config" memory?</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/JN518x-How-to-read-quot-Config-quot-memory/m-p/1386900#M12551</link>
      <description>&lt;P&gt;My question is how to read it from "&lt;STRONG&gt;firmware C code&lt;/STRONG&gt;".&lt;/P&gt;&lt;P&gt;I already used DK6Programmer many times and works fine, but I can't find anything by C code. (checked User Manual and header files...).&lt;/P&gt;</description>
      <pubDate>Wed, 15 Dec 2021 04:19:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/JN518x-How-to-read-quot-Config-quot-memory/m-p/1386900#M12551</guid>
      <dc:creator>usaygo</dc:creator>
      <dc:date>2021-12-15T04:19:36Z</dc:date>
    </item>
    <item>
      <title>Re: JN518x: How to read "Config" memory?</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/JN518x-How-to-read-quot-Config-quot-memory/m-p/1387563#M12557</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/188667"&gt;@usaygo&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could read it, one method is to use pFLASH read API(psector_ReadData) in your application to read all pFLASH content and then print it.&lt;/P&gt;
&lt;P&gt;For the memory map of the pFLASH, you can check structure pflash within struct psector_page_data_t that is defined in rom_psectr.h&lt;/P&gt;
&lt;P&gt;For example:&lt;/P&gt;
&lt;LI-CODE lang="c"&gt;psector_page_data_t page; /* Stored in the stack temporarily */
psector_page_state_t pg_state;
pg_state=psector_ReadData(PSECTOR_PFLASH_PART,0,0,sizeof(psector_page_data_t),&amp;amp;page);
if (pg_state &amp;lt; PAGE_STATE_DEGRADED)
{
	break;
}
// Use the reserved1 for example
page.pFlash.reserved1= 0x1234;&lt;/LI-CODE&gt;
&lt;P&gt;Note: Please take care and do not modify the ISP access level if you don't want to.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Mario&lt;/P&gt;</description>
      <pubDate>Wed, 15 Dec 2021 20:00:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/JN518x-How-to-read-quot-Config-quot-memory/m-p/1387563#M12557</guid>
      <dc:creator>mario_castaneda</dc:creator>
      <dc:date>2021-12-15T20:00:20Z</dc:date>
    </item>
    <item>
      <title>Re: JN518x: How to read "Config" memory?</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/JN518x-How-to-read-quot-Config-quot-memory/m-p/1387858#M12561</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Unfortunately, this is the way to read the &lt;EM&gt;pFlash&lt;/EM&gt; area, not the &lt;EM&gt;Config&lt;/EM&gt; area.&lt;BR /&gt;I apologize for any misunderstanding on this matter. However, if you have an answer for this, please let me know.&lt;/P&gt;&lt;P&gt;Question: What I want is a way to read the following "&lt;EM&gt;Config&lt;/EM&gt;" area from C/C++ firmware code.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;$ DK6Programmer.exe -V 0 -s COM4 -r Config:512 &amp;lt;= The Config, not pFlash
  COM4: Connected at 115200
  COM4: Detected JN5189 with MAC address 00:15:8D:00:05:B0:EA:86
  COM4: Selected memory: Config
  COM4: Reading 512 bytes from Config at 00000000
  COM4: Config = a41c000000000000...snip...2c196c&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just to be sure, I tried the code you gave me, but it still reads pFlash.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;           const unsigned SIZ = 16;
            uint8_t b0[SIZ];
 
            {
                Serial &amp;lt;&amp;lt; "\r\n[psector_ReadData]";
 
                psector_page_data_t page; /* Stored in the stack temporarily */
                psector_page_state_t pg_state;
                pg_state = psector_ReadData(PSECTOR_PFLASH_PART,0,0,sizeof(psector_page_data_t),&amp;amp;page);
 
                if (pg_state &amp;lt; PAGE_STATE_DEGRADED)
                {
                    Serial &amp;lt;&amp;lt; "error at psector_ReadData()";
                }
 
                uint8_t *p = (uint8_t *)&amp;amp;page;
 
                for (unsigned i = 0; i &amp;lt; 512; i += SIZ) {
                    Serial &amp;lt;&amp;lt; crlf &amp;lt;&amp;lt; format("%05x:", i);
                    for(uint8_t j = 0; j &amp;lt; SIZ; j++) {
                        Serial &amp;lt;&amp;lt; format(" %02x", *p);
                        p++;
                    }
                    Serial.flush();
                }
            }
 
            Serial &amp;lt;&amp;lt; "\r\n[Flash Dump]";
            for (int i = 0x9ec00; i &amp;lt; 0x9f000; i += SIZ) {
                Serial &amp;lt;&amp;lt; crlf &amp;lt;&amp;lt; format("%05x:", i);
                for(uint8_t j = 0; j &amp;lt; SIZ; j++) {
                    uint8_t *p = (uint8_t*)(i + j);
                    Serial &amp;lt;&amp;lt; format(" %02x", *p);
                }
                Serial.flush();
            }&lt;/LI-CODE&gt;&lt;P&gt;My code is written in C++ (I think it's not the matter in this case), where Serial is handling output to UART. And the result is...&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[psector_ReadData]
00000: 3a e6 2e 62 3d 35 b4 a7 00 00 00 00 08 00 00 00
00010: 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 00
00020: e4 04 00 00 19 e1 09 00 8f cd b5 64 01 00 00 00
00030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 40 00
00040: 00 00 00 00 8a 03 9d b7 00 00 00 00 00 00 00 00
00050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00060: 34 12 38 26 01 c5 1b 00 d1 4a d8 03 00 8d 15 00
00070: 00 00 00 60 37 9f 7a b3 00 00 00 00 00 00 00 00
00080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00090: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
000a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
000b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
000c0: 79 2b cf e0 b3 b7 60 d6 38 47 c5 49 28 53 fa 71
000d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
000e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
...
001f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[Flash Dump] Data is stored at both 9ec00 and 9ee00.
9ec00: 3a e6 2e 62 3d 35 b4 a7 00 00 00 00 08 00 00 00
9ec10: 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 00
9ec20: e4 04 00 00 19 e1 09 00 8f cd b5 64 01 00 00 00
9ec30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 40 00
9ec40: 00 00 00 00 8a 03 9d b7 00 00 00 00 00 00 00 00
9ec50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
9ec60: 34 12 38 26 01 c5 1b 00 d1 4a d8 03 00 8d 15 00
...
9edf0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
9ee00: 3a e6 2e 62 3d 35 b4 a7 00 00 00 00 08 00 00 00
9ee10: 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 00
...
9eff0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Dec 2021 06:22:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/JN518x-How-to-read-quot-Config-quot-memory/m-p/1387858#M12561</guid>
      <dc:creator>usaygo</dc:creator>
      <dc:date>2021-12-16T06:22:46Z</dc:date>
    </item>
    <item>
      <title>Re: JN518x: How to read "Config" memory?</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/JN518x-How-to-read-quot-Config-quot-memory/m-p/1388302#M12564</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/188667"&gt;@usaygo&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;What are the config values that you want to modify?&lt;/P&gt;
&lt;P&gt;Is there any specific reason that you want to read out all the config values?&lt;/P&gt;
&lt;P&gt;Do you want to modify the trim values?&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Mario&lt;/P&gt;</description>
      <pubDate>Thu, 16 Dec 2021 18:44:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/JN518x-How-to-read-quot-Config-quot-memory/m-p/1388302#M12564</guid>
      <dc:creator>mario_castaneda</dc:creator>
      <dc:date>2021-12-16T18:44:44Z</dc:date>
    </item>
    <item>
      <title>Re: JN518x: How to read "Config" memory?</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/JN518x-How-to-read-quot-Config-quot-memory/m-p/1388361#M12566</link>
      <description>&lt;P&gt;&lt;EM&gt;&amp;gt;&amp;nbsp;What are the config values that you want to modify?&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;We need to &lt;STRONG&gt;read&lt;/STRONG&gt; &lt;EM&gt;factory MAC&lt;/EM&gt; area and no need to write it. After programming &lt;EM&gt;154_cmac0&lt;/EM&gt;, C/C++ API(e.g. vMMAC_GetMacAddress()) does not report &lt;EM&gt;factory MAC&lt;/EM&gt; but &lt;EM&gt;154_cmac0&lt;/EM&gt;.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;gt;&amp;nbsp;Is there any specific reason that you want to read out all the config values?&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;We use &lt;EM&gt;factory MAC&lt;/EM&gt; as a part of encryption (details cannot be disclosed).&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;gt;&amp;nbsp;Do you want to modify the trim values?&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;No. Only reading.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The workaround is to copy &lt;EM&gt;factory MAC&lt;/EM&gt; value to &lt;EM&gt;154_cmac1&lt;/EM&gt;, however, if possible, it should be avoided for simpler factory process.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 16 Dec 2021 22:00:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/JN518x-How-to-read-quot-Config-quot-memory/m-p/1388361#M12566</guid>
      <dc:creator>usaygo</dc:creator>
      <dc:date>2021-12-16T22:00:04Z</dc:date>
    </item>
    <item>
      <title>Re: JN518x: How to read "Config" memory?</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/JN518x-How-to-read-quot-Config-quot-memory/m-p/1390260#M12579</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/188667"&gt;@usaygo&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Sorry for the late response.&lt;/P&gt;
&lt;P&gt;I was checking the code, you are reading out the pFlash as a first parameter.&lt;/P&gt;
&lt;LI-CODE lang="c"&gt;    PSECTOR_PAGE0_PART,  /*!&amp;lt; Page0 partition : termed PSECT by FLashProgramemr tool
                         * Image related data */
    PSECTOR_PFLASH_PART, /*!&amp;lt; PFLASH : Custommer configuration data */&lt;/LI-CODE&gt;
&lt;P&gt;Could you please try to read out page 0?&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Mario&lt;/P&gt;</description>
      <pubDate>Tue, 21 Dec 2021 17:04:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/JN518x-How-to-read-quot-Config-quot-memory/m-p/1390260#M12579</guid>
      <dc:creator>mario_castaneda</dc:creator>
      <dc:date>2021-12-21T17:04:11Z</dc:date>
    </item>
    <item>
      <title>Re: JN518x: How to read "Config" memory?</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/JN518x-How-to-read-quot-Config-quot-memory/m-p/1391029#M12586</link>
      <description>&lt;P&gt;Thanks Mario, however I can't still get them. Please correct if I am wrong.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The "Config" Area.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;C:\&amp;gt;DK6Programmer.exe -V 0 -s COM22 -r Config:512
 COM22: Connected at 115200
 COM22: Detected K32W061 with MAC address xx:xx...
 COM22: Selected memory: Config
 COM22: Reading 512 bytes from Config at 00000000
 COM22: Config = a42d00000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000da02000000000000
00000000000000d054375254303332413832302e31474e533d7d0080c8000000a6153401
ffc60000d14ad803008d15000000000000000000f1bb1400000000001340040001000000
        ^^^^^^^^^^^^^^^^ FACTORY MAC ADDR (WHAT I WANT TO READ)
00000000000000000000000000000000000066663900207347003273ca52ce52299a000d
...&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;The C code (compiled by C++ compiler)&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;    PRINTF("\n[psector read test]\n");

	for (unsigned pg = 0; pg &amp;lt; 2; pg++) { // only effective at pg==0.
		const unsigned SIZ = 16;
		PRINTF("\n[psector_ReadData PAGE0/%d]", pg);

		psector_page_data_t page; /* Stored in the stack temporarily */
		psector_page_state_t pg_state;
		pg_state = psector_ReadData(PSECTOR_PAGE0_PART,pg,0,512,&amp;amp;page);

		if (pg_state &amp;lt; PAGE_STATE_DEGRADED)
		{
			PRINTF("error at psector_ReadData()");
		} else {
			uint8_t *p = (uint8_t *)&amp;amp;page;
			for (unsigned i = 0; i &amp;lt; 512; i += SIZ) {
				PRINTF("\n%05x:", i);
				for(uint8_t j = 0; j &amp;lt; SIZ; j++) {
					PRINTF(" %02x", *p);
					p++;
				}
				CLOCK_uDelay(6000); // small delay for flushing.
			}
		}
	}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The result:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[psector_ReadData PAGE0/0]
    0: 56 73 e2 2b a9 8c 1d c5  0  0  0  0  0  0  0  0
   10: 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11  0
   20:  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
   30:  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
...
[psector_ReadData PAGE0/1]error at psector_ReadData()&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Dec 2021 02:53:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/JN518x-How-to-read-quot-Config-quot-memory/m-p/1391029#M12586</guid>
      <dc:creator>usaygo</dc:creator>
      <dc:date>2021-12-23T02:53:20Z</dc:date>
    </item>
    <item>
      <title>Re: JN518x: How to read "Config" memory?</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/JN518x-How-to-read-quot-Config-quot-memory/m-p/1391705#M12596</link>
      <description>&lt;P&gt;I tried possible parameter (as below), and got values w/o error from two patterns.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;  psector_ReadData(0..7, 0..7, 0, 512, &amp;amp;page); // 64 patterns
then the following patterns are okay to get value.
  psector_ReadData(0, 0, 0, 512, &amp;amp;page); // ??? (data do not match with Config area)
  psector_ReadData(1, 0, 0, 512, &amp;amp;page); // pFlash area&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Dec 2021 07:06:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/JN518x-How-to-read-quot-Config-quot-memory/m-p/1391705#M12596</guid>
      <dc:creator>usaygo</dc:creator>
      <dc:date>2021-12-24T07:06:19Z</dc:date>
    </item>
    <item>
      <title>Re: JN518x: How to read "Config" memory?</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/JN518x-How-to-read-quot-Config-quot-memory/m-p/1392736#M12620</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/188667"&gt;@usaygo&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;I am sorry for the late reply. I am still working on your requirement. In this case, you want to read out the factory mac Address, in this case, 00:15:8D:00:03:D7:D5:5E. Am I wrong?&lt;/P&gt;
&lt;P&gt;I am assuming, that if you read the 154_cmac0 with the tool, did you see your new address?&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mario_castaneda_0-1640712150006.png" style="width: 562px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/166380iEA5DA281161762A7/image-dimensions/562x205?v=v2" width="562" height="205" role="button" title="mario_castaneda_0-1640712150006.png" alt="mario_castaneda_0-1640712150006.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Mario&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Dec 2021 17:33:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/JN518x-How-to-read-quot-Config-quot-memory/m-p/1392736#M12620</guid>
      <dc:creator>mario_castaneda</dc:creator>
      <dc:date>2021-12-28T17:33:59Z</dc:date>
    </item>
    <item>
      <title>Re: JN518x: How to read "Config" memory?</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/JN518x-How-to-read-quot-Config-quot-memory/m-p/1393975#M12655</link>
      <description>&lt;P&gt;Hello Mario and Happy New Year!&lt;/P&gt;&lt;P&gt;I confirmed that the DK6_Programmer and MMAC API behaves the same: if set &lt;EM&gt;cmac0&lt;/EM&gt;, it shows &lt;EM&gt;cmac0&lt;/EM&gt;, otherwise &lt;EM&gt;factory mac&lt;/EM&gt;. My question is how to get &lt;EM&gt;factory mac&lt;/EM&gt;&amp;nbsp;from the firmware C/C++ code when &lt;EM&gt;cmac0&lt;/EM&gt;&amp;nbsp;is already set via DK6_Programmer.&lt;/P&gt;&lt;P&gt;I just guessed that the easiest way to get it is to read "Config" area, however I only need the &lt;EM&gt;factory mac&lt;/EM&gt;&amp;nbsp;from C/C++ code.&lt;/P&gt;&lt;P&gt;(The workaround is to set an additional copy of &lt;EM&gt;factory mac&lt;/EM&gt; on "pFlash" area. Temporally I implemented in this way, but I would like to avoid it for more efficient/simpler way of factory process.)&lt;/P&gt;&lt;P&gt;//Seigo&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jan 2022 05:30:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/JN518x-How-to-read-quot-Config-quot-memory/m-p/1393975#M12655</guid>
      <dc:creator>usaygo</dc:creator>
      <dc:date>2022-01-04T05:30:32Z</dc:date>
    </item>
    <item>
      <title>Re: JN518x: How to read "Config" memory?</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/JN518x-How-to-read-quot-Config-quot-memory/m-p/1396239#M12686</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/188667"&gt;@usaygo&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Happy New Year!!!&lt;/P&gt;
&lt;P&gt;I am checking the process to read out the factory mac address. I will get back to you as soon as possible.&lt;/P&gt;
&lt;P&gt;Note: it is important to mention that you have to request a specific range of addresses with the specific OUI.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Mario&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jan 2022 16:39:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/JN518x-How-to-read-quot-Config-quot-memory/m-p/1396239#M12686</guid>
      <dc:creator>mario_castaneda</dc:creator>
      <dc:date>2022-01-07T16:39:52Z</dc:date>
    </item>
    <item>
      <title>Re: JN518x: How to read "Config" memory?</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/JN518x-How-to-read-quot-Config-quot-memory/m-p/1397803#M12716</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks, waiting for the reply.&lt;/P&gt;&lt;P&gt;The reason why we need a factory MAC is just to get an unique number assigned to each chip. We don't plan to use factory MAC over RF packets, but to use our own registered addresses.&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Seigo Okumura&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jan 2022 04:47:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/JN518x-How-to-read-quot-Config-quot-memory/m-p/1397803#M12716</guid>
      <dc:creator>usaygo</dc:creator>
      <dc:date>2022-01-12T04:47:51Z</dc:date>
    </item>
    <item>
      <title>Re: JN518x: How to read "Config" memory?</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/JN518x-How-to-read-quot-Config-quot-memory/m-p/1398201#M12721</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/188667"&gt;@usaygo&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Please look at the next implementation in code.&lt;/P&gt;
&lt;LI-CODE lang="c"&gt;#define MAC_ADDR_DEFAULT 0x0009fc70
  
  tsExtAddr psMacAddr;

  /* Get the factory MAC address from the N-2 page */
  psMacAddr.u32L = *(volatile uint32_t *)(MAC_ADDR_DEFAULT);
  psMacAddr.u32H = *(volatile uint32_t *)(MAC_ADDR_DEFAULT + 4);&lt;/LI-CODE&gt;
&lt;P&gt;You will read out the mac address.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Mario&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jan 2022 15:44:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/JN518x-How-to-read-quot-Config-quot-memory/m-p/1398201#M12721</guid>
      <dc:creator>mario_castaneda</dc:creator>
      <dc:date>2022-01-12T15:44:55Z</dc:date>
    </item>
    <item>
      <title>Re: JN518x: How to read "Config" memory?</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/JN518x-How-to-read-quot-Config-quot-memory/m-p/1398502#M12725</link>
      <description>&lt;P&gt;Hi Mario,&lt;/P&gt;&lt;P&gt;It works!&amp;nbsp;&lt;/P&gt;&lt;P&gt;It seems that my messages were not accurate and confused you. I am deeply grateful to you.&lt;/P&gt;&lt;P&gt;Again, thank you very much!&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jan 2022 02:12:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/JN518x-How-to-read-quot-Config-quot-memory/m-p/1398502#M12725</guid>
      <dc:creator>usaygo</dc:creator>
      <dc:date>2022-01-13T02:12:39Z</dc:date>
    </item>
  </channel>
</rss>

