<?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: How to IAP Sector0? in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-IAP-Sector0/m-p/605279#M23584</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Problem solved. Set interrupt vectors reside in Flash, then erase/program sector0 works as expected.&lt;/P&gt;&lt;P&gt;/*----------------------------------------------------------------------------&lt;BR /&gt; Setup() configure PC &amp;amp; SP for RAM Debug&lt;BR /&gt; *----------------------------------------------------------------------------*/&lt;/P&gt;&lt;P&gt;FUNC void Setup (void) {&lt;BR /&gt; SP = _RDWORD(0x10000000); // Setup Stack Pointer&lt;BR /&gt; PC = _RDWORD(0x10000004); // Setup Program Counter&lt;BR /&gt; _WDWORD(0xE000ED08, 0x10000000); // Setup Vector Table Offset Register (CM0+ has VTOR register)&lt;BR /&gt; //_WDWORD(0x40048000, 0x00000001); // Interrupt vectors are re-mapped to Static RAM&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 13 Apr 2018 03:08:05 GMT</pubDate>
    <dc:creator>gracezhang</dc:creator>
    <dc:date>2018-04-13T03:08:05Z</dc:date>
    <item>
      <title>How to IAP Sector0?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-IAP-Sector0/m-p/605276#M23581</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have started several threads and worked through most of my problems however I can not seem to get past this one.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not able to erase or program the first 512bytes of sector0. All of my IAP commands return CMD_SUCCESS. But when I read back after an erase the data in the first 512bytes is the same. The rest of the sector will be erased properly after programming, and written properly after a write.&amp;nbsp;The CRP is set to 0xFFFFFFFF, I relocate the interrupt table to RAM, but nothing seems to change the behavior.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am able to program data into the first 512bytes if I use the minimum write size of 256bytes however the data is full of errors. There are bits set that shouldn't be and some that should are not. Worse, after I write the chip no longer responds to IAP commands, including check ID. They never return a response, and the DHCSR reports that the core is in "LOCKUP". I am still able to read the JTAG id and write to the DPs and APs, even read and write to RAM, and read flash. But as soon as I try an IAP command the core locks up. I am not sure what it is about the state of the chip that causes it to lock, as erasing the chip with a ULink2 is able to recover it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I see that several other people have posted about this issue in the LPC Forums but not with these specifics. I believe some guidance from an NXP engineer is needed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Feb 2017 00:52:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-IAP-Sector0/m-p/605276#M23581</guid>
      <dc:creator>petervanhoomiss</dc:creator>
      <dc:date>2017-02-28T00:52:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to IAP Sector0?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-IAP-Sector0/m-p/605277#M23582</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;did you solve the problem in the mean time?&lt;/P&gt;&lt;P&gt;We have the same problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Axel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Mar 2018 10:06:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-IAP-Sector0/m-p/605277#M23582</guid>
      <dc:creator>axelschmidt</dc:creator>
      <dc:date>2018-03-27T10:06:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to IAP Sector0?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-IAP-Sector0/m-p/605278#M23583</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;We have the same problem for LPC8N04 device. Sector0 can't be erased and programmed use IAP method, while &lt;SPAN&gt;JFlash&amp;nbsp;&lt;/SPAN&gt;could erase and program sector 0. Not sure how JFlash do that. If you have this problem solved, please share the answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;Grace&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Apr 2018 01:10:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-IAP-Sector0/m-p/605278#M23583</guid>
      <dc:creator>gracezhang</dc:creator>
      <dc:date>2018-04-13T01:10:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to IAP Sector0?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-IAP-Sector0/m-p/605279#M23584</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Problem solved. Set interrupt vectors reside in Flash, then erase/program sector0 works as expected.&lt;/P&gt;&lt;P&gt;/*----------------------------------------------------------------------------&lt;BR /&gt; Setup() configure PC &amp;amp; SP for RAM Debug&lt;BR /&gt; *----------------------------------------------------------------------------*/&lt;/P&gt;&lt;P&gt;FUNC void Setup (void) {&lt;BR /&gt; SP = _RDWORD(0x10000000); // Setup Stack Pointer&lt;BR /&gt; PC = _RDWORD(0x10000004); // Setup Program Counter&lt;BR /&gt; _WDWORD(0xE000ED08, 0x10000000); // Setup Vector Table Offset Register (CM0+ has VTOR register)&lt;BR /&gt; //_WDWORD(0x40048000, 0x00000001); // Interrupt vectors are re-mapped to Static RAM&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Apr 2018 03:08:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-IAP-Sector0/m-p/605279#M23584</guid>
      <dc:creator>gracezhang</dc:creator>
      <dc:date>2018-04-13T03:08:05Z</dc:date>
    </item>
  </channel>
</rss>

