<?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: Flash read/write on LPC54102 in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/Flash-read-write-on-LPC54102/m-p/588225#M21757</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would guess that the write never worked. Where is the code running that is trying to write to the flash? It MUST be (re)located in RAM - you cannot program the flash if the code is running from that flash.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 19 Jul 2016 12:54:50 GMT</pubDate>
    <dc:creator>avt</dc:creator>
    <dc:date>2016-07-19T12:54:50Z</dc:date>
    <item>
      <title>Flash read/write on LPC54102</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Flash-read-write-on-LPC54102/m-p/588224#M21756</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i am using board which contains NXP's lpc54102. I am trying to write data to a flash (Sector 15 , Address 0x0007E000) and read it using memcpy() function. I am using Chip_IAP_CopyRamToFlash() api to write data. If i read data using memcpy() immediately after writing then i am able to read the proper data.&amp;nbsp; if i try to read data in some other file using memcpy function, then i am not getting the expected data. What could be the issue? Is there any sequence to follow while reading data from the flash?(IAP mode)&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in adavance,&lt;/P&gt;&lt;P&gt;Ck&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jul 2016 08:38:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Flash-read-write-on-LPC54102/m-p/588224#M21756</guid>
      <dc:creator>chethankumar</dc:creator>
      <dc:date>2016-07-19T08:38:17Z</dc:date>
    </item>
    <item>
      <title>Re: Flash read/write on LPC54102</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Flash-read-write-on-LPC54102/m-p/588225#M21757</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would guess that the write never worked. Where is the code running that is trying to write to the flash? It MUST be (re)located in RAM - you cannot program the flash if the code is running from that flash.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jul 2016 12:54:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Flash-read-write-on-LPC54102/m-p/588225#M21757</guid>
      <dc:creator>avt</dc:creator>
      <dc:date>2016-07-19T12:54:50Z</dc:date>
    </item>
    <item>
      <title>Re: Flash read/write on LPC54102</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Flash-read-write-on-LPC54102/m-p/588226#M21758</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;Write function worked. I tested and verified by reading the data from flash&lt;/P&gt;&lt;P&gt;using memcpy function. I am able to see the correct data in one particular&lt;/P&gt;&lt;P&gt;file. When I try to read data using memcpy in some other file then I am&lt;/P&gt;&lt;P&gt;not seeing the same data which I saw in another file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Code to write to flash is there in RAM itself.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Chethan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jul 2016 14:28:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Flash-read-write-on-LPC54102/m-p/588226#M21758</guid>
      <dc:creator>chethankumar</dc:creator>
      <dc:date>2016-07-19T14:28:57Z</dc:date>
    </item>
    <item>
      <title>Re: Flash read/write on LPC54102</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Flash-read-write-on-LPC54102/m-p/588227#M21759</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So if the correct values are stored in the flash, then it must be a bug in your code that is reading the wrong values... Use the debugger to find out what addresses you are using in your memcpy and also check the ode that validates the values.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jul 2016 17:15:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Flash-read-write-on-LPC54102/m-p/588227#M21759</guid>
      <dc:creator>avt</dc:creator>
      <dc:date>2016-07-19T17:15:06Z</dc:date>
    </item>
    <item>
      <title>Re: Flash read/write on LPC54102</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Flash-read-write-on-LPC54102/m-p/588228#M21760</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In earlier post you mentioned like this.&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;" Where is the code running that is trying to write to the flash? It MUST be (re)located in RAM - you cannot program the flash if the code is running from that flash" &lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now i got doubt where exactly my code will reside? Is it on RAM or flash? By default program gets stored in flash&amp;nbsp; right? Do i need to move IAP wrapper code to RAM? If so, how to do it?&lt;/P&gt;&lt;P&gt;Second thing, Once i write data to the Flash using IAP command then it should be there in flash. Now in my case i am using sector 15 ( address 0x00078000). And i should be able to read the data anytime right (after power cycle also)?.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So if the correct values are stored in the flash, then it must be a bug in your code that is reading the wrong values... Use the debugger to find out what addresses you are using in your memcpy and also check the ode that validates the values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;So if the correct values are stored in the flash, then it must be a bug in your code that is reading the wrong values... Use the debugger to find out what addresses you are using in your memcpy and also check the ode that validates the values.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; After writing to the flash using copyRAMtoFlash() command i read the data using memcpy() function and i colud see the data which i have written to the flash. After program comes out of that function when i try to read data using memcpy() from the sdame address then i am not getting the expected result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Chethan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jul 2016 04:26:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Flash-read-write-on-LPC54102/m-p/588228#M21760</guid>
      <dc:creator>chethankumar</dc:creator>
      <dc:date>2016-07-20T04:26:07Z</dc:date>
    </item>
    <item>
      <title>Re: Flash read/write on LPC54102</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Flash-read-write-on-LPC54102/m-p/588229#M21761</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you are using LPCXpresso (as I am) this FAQ describes how to place code into RAM: &lt;A href="https://community.nxp.com/thread/389110"&gt;Relocating code from FLASH to RAM&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN style="font-family: inherit;"&gt;After writing to the flash using copyRAMtoFlash() command i read the data using memcpy() function and i colud see the data which i have written to the flash. After program comes out of that function when i try to read data using memcpy() from the sdame address then i am not getting the expected result.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;This suggests that your 1st memcpy() is not actually copying from flash - perhaps your are checking your original ram-based data? As I said, you should use a debugger to actually check that you are &lt;STRONG&gt;really&lt;/STRONG&gt; doing what you think you are doing (i.e. checking the addresses used in the various memcpy() calls).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jul 2016 08:14:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Flash-read-write-on-LPC54102/m-p/588229#M21761</guid>
      <dc:creator>avt</dc:creator>
      <dc:date>2016-07-20T08:14:29Z</dc:date>
    </item>
    <item>
      <title>Re: Flash read/write on LPC54102</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Flash-read-write-on-LPC54102/m-p/588230#M21762</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Issue resolved. Issue was with my code&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jul 2016 02:20:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Flash-read-write-on-LPC54102/m-p/588230#M21762</guid>
      <dc:creator>chethankumar</dc:creator>
      <dc:date>2016-07-21T02:20:01Z</dc:date>
    </item>
  </channel>
</rss>

