<?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: IAP write problem - using the same memory bank for bootloader and application in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/IAP-write-problem-using-the-same-memory-bank-for-bootloader-and/m-p/551222#M14164</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am also having the same problem. I am able to erase/write Flash Bank B sectors. But not able to erase any of the Flash bank A sectors.&lt;/P&gt;&lt;TABLE border="1" style="color: #51626f; background-color: #ffffff; border: 1px solid inherit; margin: 0px 0px 2px;"&gt;&lt;TBODY style="border: inherit solid inherit; font-weight: inherit;"&gt;&lt;TR style="border: inherit solid inherit; font-weight: inherit;"&gt;&lt;TD bgcolor="#cacaca" style="background-color: #cacaca; border: 1px solid black; font-weight: 400; padding: 2px 4px;"&gt;&lt;PRE style="border: 0px; font-weight: inherit;"&gt;__attribute__((section(".RAM")))&lt;/PRE&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried with similar commands __attribute__((section("RAMCODESECTION"))). In scatter file i have added the following things:&lt;/P&gt;&lt;P&gt;RW_CODE 0x10080000 OVERLAY 0x0000A000 { ; RW data&lt;BR /&gt; *.o (RAMCODESECTION)&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;but i am not getting the exact steps to be followed to make the function run from RAM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could anyone please explain &amp;nbsp;in detail, it will be helpful&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in Advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 18 Nov 2016 11:49:41 GMT</pubDate>
    <dc:creator>ponalagappan</dc:creator>
    <dc:date>2016-11-18T11:49:41Z</dc:date>
    <item>
      <title>IAP write problem - using the same memory bank for bootloader and application</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/IAP-write-problem-using-the-same-memory-bank-for-bootloader-and/m-p/551215#M14157</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by joaopaulosm on Mon May 30 07:35:08 MST 2016&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hello friends,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm having a problem trying to implement a bootloader. The scenario is that follows: a LPC4357 (using only the M4 core) with a bootloader that occupies the first 128 kB of the FLASH A BANK (sectors 0 to 8). The main firmware image is located at an external SPIFI memory. I want to write this image on the following sectors of the on-chip flash (sectors 9 to 14) at the same bank.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The problem is when I try to write the flash using the IAP calls (prepare, erase, prepare, write) the core raises a hardfault. The odd issue is that when I use the exactly same code changing the "destination" to the on-chip flash BANK B, the whole procedure works fine. I've already checked the content of the FLASH B after running the boot loader, and it's fine.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So, is there any issue on using IAP commands affecting the same BANK which your code is running? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:33:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/IAP-write-problem-using-the-same-memory-bank-for-bootloader-and/m-p/551215#M14157</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T18:33:59Z</dc:date>
    </item>
    <item>
      <title>Re: IAP write problem - using the same memory bank for bootloader and application</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/IAP-write-problem-using-the-same-memory-bank-for-bootloader-and/m-p/551216#M14158</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by vtw.433e on Mon May 30 09:19:38 MST 2016&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;You must run iap from ram. You cannot program the flash while trying to run from the same bank. This is documented&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:34:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/IAP-write-problem-using-the-same-memory-bank-for-bootloader-and/m-p/551216#M14158</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T18:34:00Z</dc:date>
    </item>
    <item>
      <title>Re: IAP write problem - using the same memory bank for bootloader and application</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/IAP-write-problem-using-the-same-memory-bank-for-bootloader-and/m-p/551217#M14159</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by joaopaulosm on Mon May 30 11:57:14 MST 2016&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks vtw.433e !&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've been looking for this information in the Reference Manual and in some application notes, but it is not so clear. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But how should I do this? I have to put all the boot loader code to run on RAM or only the functions that calls the IAP entry? Or should I copy the IAP code which is at ROM to the RAM?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm using a layered architecture to access the hardware, so it is not so easy to re-map all the functions and routines to RAM. And I'm also using the GNU ARM GCC toolchain, with a GNU linker script, which is not so intuitive as using IAR or KEIL.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance for your help.&amp;nbsp; &lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:34:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/IAP-write-problem-using-the-same-memory-bank-for-bootloader-and/m-p/551217#M14159</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T18:34:00Z</dc:date>
    </item>
    <item>
      <title>Re: IAP write problem - using the same memory bank for bootloader and application</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/IAP-write-problem-using-the-same-memory-bank-for-bootloader-and/m-p/551218#M14160</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by HCTEK on Tue May 31 04:01:42 MST 2016&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;the 6.4.5.6 section of the User Manual: "The on-chip flash memory is not accessible during erase/write operations." And also in section 6.8: " The flash memory is not accessible during a write or an erase operation." It supports the vtw.433e reply.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You are using the bank B for other purpose? Why not the boot loader in there?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cumpz &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;João és PT? ;)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:34:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/IAP-write-problem-using-the-same-memory-bank-for-bootloader-and/m-p/551218#M14160</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T18:34:01Z</dc:date>
    </item>
    <item>
      <title>Re: IAP write problem - using the same memory bank for bootloader and application</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/IAP-write-problem-using-the-same-memory-bank-for-bootloader-and/m-p/551219#M14161</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by joaopaulosm on Tue May 31 06:41:10 MST 2016&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the answers, guys.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I moved the functions that performs the calls to IAP to RAM, using &lt;/SPAN&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;__attribute__((section(".RAM")))&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;SPAN&gt; and now it's working fine. I only had to prevent the firmware to be interrupted by the SysTick, because the IRQ handler is in flash. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Problem solved! Thanks again!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;By the way, I'm not from Portugal.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards from Brasil! &lt;SPAN class="lia-unicode-emoji" title=":grinning_face_with_big_eyes:"&gt;&lt;LI-EMOJI id="lia_grinning-face-with-big-eyes" title=":grinning_face_with_big_eyes:"&gt;&lt;/LI-EMOJI&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:34:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/IAP-write-problem-using-the-same-memory-bank-for-bootloader-and/m-p/551219#M14161</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T18:34:02Z</dc:date>
    </item>
    <item>
      <title>Re: IAP write problem - using the same memory bank for bootloader and application</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/IAP-write-problem-using-the-same-memory-bank-for-bootloader-and/m-p/551220#M14162</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 Tue May 31 08:12:37 MST 2016&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: &lt;/STRONG&gt;&lt;BR /&gt;I only had to prevent the firmware to be interrupted by the SysTick, because the IRQ handler is in flash. &lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;SPAN&gt;That's the culprit!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;No need to move the calling functions to RAM. IAP code is in ROM, which already avoids a conflict with flash.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Rolf&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:34:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/IAP-write-problem-using-the-same-memory-bank-for-bootloader-and/m-p/551220#M14162</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T18:34:02Z</dc:date>
    </item>
    <item>
      <title>Re: IAP write problem - using the same memory bank for bootloader and application</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/IAP-write-problem-using-the-same-memory-bank-for-bootloader-and/m-p/551221#M14163</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:12:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/IAP-write-problem-using-the-same-memory-bank-for-bootloader-and/m-p/551221#M14163</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-19T01:12:11Z</dc:date>
    </item>
    <item>
      <title>Re: IAP write problem - using the same memory bank for bootloader and application</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/IAP-write-problem-using-the-same-memory-bank-for-bootloader-and/m-p/551222#M14164</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am also having the same problem. I am able to erase/write Flash Bank B sectors. But not able to erase any of the Flash bank A sectors.&lt;/P&gt;&lt;TABLE border="1" style="color: #51626f; background-color: #ffffff; border: 1px solid inherit; margin: 0px 0px 2px;"&gt;&lt;TBODY style="border: inherit solid inherit; font-weight: inherit;"&gt;&lt;TR style="border: inherit solid inherit; font-weight: inherit;"&gt;&lt;TD bgcolor="#cacaca" style="background-color: #cacaca; border: 1px solid black; font-weight: 400; padding: 2px 4px;"&gt;&lt;PRE style="border: 0px; font-weight: inherit;"&gt;__attribute__((section(".RAM")))&lt;/PRE&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried with similar commands __attribute__((section("RAMCODESECTION"))). In scatter file i have added the following things:&lt;/P&gt;&lt;P&gt;RW_CODE 0x10080000 OVERLAY 0x0000A000 { ; RW data&lt;BR /&gt; *.o (RAMCODESECTION)&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;but i am not getting the exact steps to be followed to make the function run from RAM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could anyone please explain &amp;nbsp;in detail, it will be helpful&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in Advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Nov 2016 11:49:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/IAP-write-problem-using-the-same-memory-bank-for-bootloader-and/m-p/551222#M14164</guid>
      <dc:creator>ponalagappan</dc:creator>
      <dc:date>2016-11-18T11:49:41Z</dc:date>
    </item>
  </channel>
</rss>

