<?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のトピックRe: IAP copy RAM to Flash problem with 32KB sectors</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/IAP-copy-RAM-to-Flash-problem-with-32KB-sectors/m-p/524497#M7133</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by DF9DQ on Mon Apr 11 09:09:44 MST 2016&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Calling "sector prepare" eight times is just fine. All the sector prepare call does is grant you permission for precisely one following erase/program operation.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;For each 4K chunk you must ask for permission again.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 18:08:15 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T18:08:15Z</dc:date>
    <item>
      <title>IAP copy RAM to Flash problem with 32KB sectors</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/IAP-copy-RAM-to-Flash-problem-with-32KB-sectors/m-p/524496#M7132</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by mostafanfs on Mon Apr 11 08:48:47 MST 2016&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;LPC1778 has 30 sectors numbered sector #0 to sector #29 . The first 16th sectors (0 to 15) are 4KB wide and remains sectors are 32KB wide (16 to 28). Sector #29 is where bootloader functions resides. So we leave it just there. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now I have new firmware in RAM in a 4KB buffer. There is no problem with 4KB sectors (0 to 15). First I prepare them for writing then simply copy buffer in RAM to the desired sector. And it works just fine. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Problem begins when I try to copy buffer in RAM into 32KB sectors (16 to 28). Because I have 4KB of data in RAM each time and when I prepare a sector for writing (say sector 16 which is 32KB) I can write to first 4KB of that sector. Then when I want to copy the next 4KB it returns that sector has not been prepared for writing which kind of makes sense considering I just wrote into its first 4KB address. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So I figured I call prepare function on a 32KB sector 8 times (that is 32/4 = 8). Each time before writing a 4KB into a 32KB sector. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But I think it's not the right thing to do because I believe it corrupts the data that has already been written to the sector whenever I try to prepare that sector for another 4KB writing. (because prepare function needs sector numbers NOT memory addresses)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So you see what I'm dealing with here. I'm gonna ask one more time. How can I copy 4KB data (size of buffer) from RAM into a 32KB sector correctly? &lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:08:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/IAP-copy-RAM-to-Flash-problem-with-32KB-sectors/m-p/524496#M7132</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T18:08:14Z</dc:date>
    </item>
    <item>
      <title>Re: IAP copy RAM to Flash problem with 32KB sectors</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/IAP-copy-RAM-to-Flash-problem-with-32KB-sectors/m-p/524497#M7133</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by DF9DQ on Mon Apr 11 09:09:44 MST 2016&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Calling "sector prepare" eight times is just fine. All the sector prepare call does is grant you permission for precisely one following erase/program operation.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;For each 4K chunk you must ask for permission again.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:08:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/IAP-copy-RAM-to-Flash-problem-with-32KB-sectors/m-p/524497#M7133</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T18:08:15Z</dc:date>
    </item>
    <item>
      <title>Re: IAP copy RAM to Flash problem with 32KB sectors</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/IAP-copy-RAM-to-Flash-problem-with-32KB-sectors/m-p/524498#M7134</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;bump&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 19 Jun 2016 01:07:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/IAP-copy-RAM-to-Flash-problem-with-32KB-sectors/m-p/524498#M7134</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-19T01:07:54Z</dc:date>
    </item>
  </channel>
</rss>

