<?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: LPC1343 IAP hard fault in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1343-IAP-hard-fault/m-p/525497#M8133</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by mubes on Sun Jun 01 06:42:07 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi Jeff,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Voltage droops/poor decoupling are the usual culprit for this problem...have a good hard stare are your rails while you're entering/in ISP and see if they show anything abnormal.&amp;nbsp; I'm told the programming process takes a fair amount of power, but I've never gone to the trouble of measuring it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Good luck&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Dave&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 16:56:01 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T16:56:01Z</dc:date>
    <item>
      <title>LPC1343 IAP hard fault</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1343-IAP-hard-fault/m-p/525496#M8132</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by kraln on Sat May 31 13:10:35 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi All,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm having an issue whereby sometimes the IAP call to erase sectors on a LPC1343 doesn't ever return... but it erases the sectors. This leads to the awkward situation in which the watchdog kicks and the micro reboots with a completely erased internal flash. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have reserved 32 bytes of memory for IAP as per the datasheet, relocated the relevant code to RAM, and disabled interrupts globally before attempting to use the IAP. Depending on the exact order of operations, I can either reliably cause a hard fault, or somewhat reliably avoid it. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I was wondering if there is any documentation, beyond the 32 bytes of RAM, on what the exact setup for the IAP commands should be? Or, failing that, any further best practices for avoiding lockups? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Jeff&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 16:56:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1343-IAP-hard-fault/m-p/525496#M8132</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T16:56:00Z</dc:date>
    </item>
    <item>
      <title>Re: LPC1343 IAP hard fault</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1343-IAP-hard-fault/m-p/525497#M8133</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by mubes on Sun Jun 01 06:42:07 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi Jeff,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Voltage droops/poor decoupling are the usual culprit for this problem...have a good hard stare are your rails while you're entering/in ISP and see if they show anything abnormal.&amp;nbsp; I'm told the programming process takes a fair amount of power, but I've never gone to the trouble of measuring it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Good luck&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Dave&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 16:56:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1343-IAP-hard-fault/m-p/525497#M8133</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T16:56:01Z</dc:date>
    </item>
    <item>
      <title>Re: LPC1343 IAP hard fault</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1343-IAP-hard-fault/m-p/525498#M8134</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by kraln on Sun Jun 01 09:38:13 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi Dave,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the comment. Normally I'd agree with you, and in fact the rails are the first thing I looked at. In this particular application, the power supply is well overbuilt as there are a bunch of ISM band transceivers and relays and so forth attached. Also, on the same hardware, different firmware 'configurations' (features enabled at compile time) behave differently, from working 100% of the time, to sometimes failing, to always failing. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Jeff&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 16:56:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1343-IAP-hard-fault/m-p/525498#M8134</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T16:56:02Z</dc:date>
    </item>
    <item>
      <title>Re: LPC1343 IAP hard fault</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1343-IAP-hard-fault/m-p/525499#M8135</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by mubes on Sun Jun 01 16:47:01 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Very odd.&amp;nbsp; Once you've hit the ISP with interrupts off there's little that should be able to get in the way..it might be an idea to check your clocks and PLL settings to make sure you're stable but after that nothing obvious springs to mind. What interval is the watchdog set for?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Dave &lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 16:56:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1343-IAP-hard-fault/m-p/525499#M8135</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T16:56:02Z</dc:date>
    </item>
    <item>
      <title>Re: LPC1343 IAP hard fault</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1343-IAP-hard-fault/m-p/525500#M8136</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by kraln on Tue Jun 03 16:54:24 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi Dave,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The watchdog is set for a few seconds, much longer than the process takes.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;One thing that might be interesting is, the behavior isn't entirely deterministic. I set up a test where the firmware updates itself (to itself) over and over and over, and sometimes it will fail after the fourth or fifth go-around. I had some issues a while ago with alignment to the IAP call, but I don't think any structural problems are at play here because it's the *same* code that sometimes works and sometimes fails. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is it worth dropping to a lower clock rate (running at 72MHz normally) for the IAP calls? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Jeff&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 16:56:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1343-IAP-hard-fault/m-p/525500#M8136</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T16:56:03Z</dc:date>
    </item>
    <item>
      <title>Re: LPC1343 IAP hard fault</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1343-IAP-hard-fault/m-p/525501#M8137</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by mubes on Wed Jun 04 00:23:12 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;That would be worth a try - or even moving to the internal osc as an experiment as the chip is completely left to its own devices at that point.&amp;nbsp; Its difficult to think of anything other than clocks and PSU stability that could have an effect once you're _in_ the ISP (as ints are off), and since you're saying that the chip is erased we have to assume that you're making the transition from your code to the ISP code OK.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;DAVE&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 16:56:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1343-IAP-hard-fault/m-p/525501#M8137</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T16:56:04Z</dc:date>
    </item>
    <item>
      <title>Re: LPC1343 IAP hard fault</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1343-IAP-hard-fault/m-p/525502#M8138</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by nxp_apps on Fri Jun 13 14:27:55 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Just to double-check, are you passing the correct frequency (in KHz) during the IAP calls? The frequency passed in during the IAP calls should be the CPU clock frequency.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;nxp_support&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 16:56:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1343-IAP-hard-fault/m-p/525502#M8138</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T16:56:05Z</dc:date>
    </item>
  </channel>
</rss>

