<?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>Wireless MCUのトピックRe: JN5189 flash</title>
    <link>https://community.nxp.com/t5/Wireless-MCU/JN5189-flash/m-p/1221686#M10658</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/86938"&gt;@mario_castaneda&lt;/a&gt; ,&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;I used the command&amp;nbsp; DK6Programmer.exe -s COM17 -e FLASH -p jn5189dk6_zigbee_coordinator_bm.bin&amp;nbsp; to download the program and found that the value of Flash was 0 for the first read.So, I want to know if the default value is 0x00 or 0xFF before Flash writes (in the initial state).&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Thank you for your reply.&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Viki&lt;/P&gt;</description>
    <pubDate>Wed, 27 Jan 2021 06:08:48 GMT</pubDate>
    <dc:creator>Viki</dc:creator>
    <dc:date>2021-01-27T06:08:48Z</dc:date>
    <item>
      <title>JN5189 flash</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/JN5189-flash/m-p/1221158#M10651</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;The chip I use is JN5189, the SDK version I use is SDK2.6.2_JN5189DK6, and the routines I use are zigbee_ed_rx_on and zigbee_coordinator.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;Now I need to write the user data into Flash. My save/read method is to refer to the flash_demo routines provided in the SDK. For example, use FLASH_Init(), FLASH_ErasePages(),FLASH_Program() and nv_safereadfromFlash () to read and write to Flash.&lt;BR /&gt;After testing, call FLASH_ErasePages() to erase flash and then read flash, read out all the values are 0.Call FLASH_Program() to write data to flash and then read flash, and the value that is read is the same as the value that was written.It is worth mentioning that pu32Start has a value of 0x10000 (the same as in flash_demo).&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;&lt;BR /&gt;Now I have the following questions:&lt;BR /&gt;1. Why do I call FLASH_ErasePages() to erase the flash and then read the corresponding flash, but read out the value of 0 instead of 1?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;&lt;BR /&gt;2. As the protocol stack itself has related operations with Flash, such as using PPDM_eSaveRecordData() to save data, using PDM_eReadDataFromRecord()to read data.But I don't know which page of Flash PDM_eSaveRecordData() operates on, so will I accidentally tamper with the data saved with PDM_eSaveRecordData() when I use FLASH_Program() to write data to the starting address of 0x10000?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;&lt;BR /&gt;3. Is it recommended to use the flash API in flash_demo to read and write the flash in the protocol stack?If not, what is the recommended way?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Viki&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jan 2021 09:39:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/JN5189-flash/m-p/1221158#M10651</guid>
      <dc:creator>Viki</dc:creator>
      <dc:date>2021-01-26T09:39:52Z</dc:date>
    </item>
    <item>
      <title>Re: JN5189 flash</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/JN5189-flash/m-p/1221472#M10656</link>
      <description>&lt;P&gt;&lt;FONT&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/181842"&gt;@Viki&lt;/a&gt;,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT&gt;Now I have the following questions:&lt;BR /&gt;1. Why do I call FLASH_ErasePages() to erase the flash and then read the corresponding flash, but read out the value of 0 instead of 1?&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT&gt;How are you reading the 1? Are you using these APIs in the Zigbee example?&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;I recommend using the PDM API&amp;nbsp;which handles the&amp;nbsp;storage of stack context data and application data in Non-Volatile Memory (NVM). For more information, please look at the&amp;nbsp;JN518x &amp;amp; K32W041/K32W061 Core utility&amp;nbsp;User Guide&amp;nbsp;2. Persistent Data Manager (PDM).&lt;/P&gt;
&lt;P&gt;JN5189DK6\docs\wireless\Zigbee&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Mario&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jan 2021 21:14:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/JN5189-flash/m-p/1221472#M10656</guid>
      <dc:creator>mario_castaneda</dc:creator>
      <dc:date>2021-01-26T21:14:05Z</dc:date>
    </item>
    <item>
      <title>Re: JN5189 flash</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/JN5189-flash/m-p/1221686#M10658</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/86938"&gt;@mario_castaneda&lt;/a&gt; ,&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;I used the command&amp;nbsp; DK6Programmer.exe -s COM17 -e FLASH -p jn5189dk6_zigbee_coordinator_bm.bin&amp;nbsp; to download the program and found that the value of Flash was 0 for the first read.So, I want to know if the default value is 0x00 or 0xFF before Flash writes (in the initial state).&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Thank you for your reply.&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Viki&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jan 2021 06:08:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/JN5189-flash/m-p/1221686#M10658</guid>
      <dc:creator>Viki</dc:creator>
      <dc:date>2021-01-27T06:08:48Z</dc:date>
    </item>
    <item>
      <title>Re: JN5189 flash</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/JN5189-flash/m-p/1222101#M10661</link>
      <description>&lt;P&gt;Hi Viki,&lt;/P&gt;
&lt;P&gt;In this case, when the DK6Programmer erases the FLASH memory, it writes 0xDEAD.&lt;/P&gt;
&lt;P&gt;You can erase or read out the memory with the following commands.&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;DK6Programmer.exe -s COM22 --read FLASH:0x400@0&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;DK6Programmer.exe -s COM22 --erase FLASH:0x100@80000&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;DK6Programmer.exe -s COM22 --write FLASH:0x04@80000=0x1234&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mario_castaneda_0-1611770817285.png" style="width: 690px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/135938iB33711ED5267A70C/image-dimensions/690x137?v=v2" width="690" height="137" role="button" title="mario_castaneda_0-1611770817285.png" alt="mario_castaneda_0-1611770817285.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Mario&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jan 2021 18:08:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/JN5189-flash/m-p/1222101#M10661</guid>
      <dc:creator>mario_castaneda</dc:creator>
      <dc:date>2021-01-27T18:08:50Z</dc:date>
    </item>
    <item>
      <title>Re: JN5189 flash</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/JN5189-flash/m-p/1223720#M10678</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/86938"&gt;@mario_castaneda&lt;/a&gt; ,&lt;/P&gt;&lt;DIV&gt;&lt;FONT&gt;I'm sorry for replying to you so late.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT&gt;After many tests, I downloaded the program using the command "DK6Programmer.exe -s COM17 -e FLASH -p jn5189dk6_zigbee_coordinator_bm.bin ", the value of reading user storage area is 0x00, and the function used for reading user data storage area is:&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="read.png" style="width: 384px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/136177iFFEAD98E7BACF747/image-size/large?v=v2&amp;amp;px=999" role="button" title="read.png" alt="read.png" /&gt;&lt;/span&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT&gt;Do I set the value of the user's storage area to 0x00 every time I download the program using the "DK6Programmer.exe -s COM17 -e FLASH -p jn5189dk6_zigbee_coordinator_bm.bin "instruction? Is this normal?&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT&gt;BR,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT&gt;Viki&lt;/FONT&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 01 Feb 2021 03:51:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/JN5189-flash/m-p/1223720#M10678</guid>
      <dc:creator>Viki</dc:creator>
      <dc:date>2021-02-01T03:51:07Z</dc:date>
    </item>
    <item>
      <title>Re: JN5189 flash</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/JN5189-flash/m-p/1224954#M10691</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Do I set the value of the user's storage area to 0x00 every time I download the program using the "DK6Programmer.exe -s COM17 -e FLASH -p jn5189dk6_zigbee_coordinator_bm.bin "instruction? Is this normal?&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If you want to save some data in that direction you could specify the offset that you want.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;You could try to read the data as in the example.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;PDM_eReadDataFromRecord(PDM_ID_APP_END_DEVICE,&lt;BR /&gt;&amp;amp;sDeviceDesc,&lt;BR /&gt;sizeof(tsDeviceDesc),&lt;BR /&gt;&amp;amp;u16ByteRead);&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Mario&lt;/P&gt;</description>
      <pubDate>Tue, 02 Feb 2021 19:18:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/JN5189-flash/m-p/1224954#M10691</guid>
      <dc:creator>mario_castaneda</dc:creator>
      <dc:date>2021-02-02T19:18:29Z</dc:date>
    </item>
  </channel>
</rss>

