<?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 Reset fails because chip not completely reset in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/Reset-fails-because-chip-not-completely-reset/m-p/593460#M22501</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by samc77 on Sun Jul 20 23:57:30 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;we are using a LPC4330 and boot from SPIFI. We have also connected SDRAM. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The problem now is, that whenever the chips resets, no matter if intentional by RGU, by watchdog or by brownout: the periperals dont get reset.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;That means, that the SCU, GPIO keep in their last state and that prevents the A9/P2_7/ISP pin from being high level on bootup. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Clearly, because the EMC is still in control of the pin, and depending what it currently does, the A9 line may be hi or lo.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For intentional reset and watchdog reset we already build a workaround and reset the GPIO+SCU manually.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But for a brownout reset, we would have to catch the BOD irq. We didnt manage to do that jet.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Still, this is a lot of workarounds for a problems thats basically in the chip, why doesnt it reset completely? How can we make it reset? I just found some snippets that its related to debug beeing enabled. But no information on how to disable debug for our configuration...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope anybody can help on this..&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Simon&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 19:20:56 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T19:20:56Z</dc:date>
    <item>
      <title>Reset fails because chip not completely reset</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Reset-fails-because-chip-not-completely-reset/m-p/593460#M22501</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by samc77 on Sun Jul 20 23:57:30 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;we are using a LPC4330 and boot from SPIFI. We have also connected SDRAM. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The problem now is, that whenever the chips resets, no matter if intentional by RGU, by watchdog or by brownout: the periperals dont get reset.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;That means, that the SCU, GPIO keep in their last state and that prevents the A9/P2_7/ISP pin from being high level on bootup. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Clearly, because the EMC is still in control of the pin, and depending what it currently does, the A9 line may be hi or lo.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For intentional reset and watchdog reset we already build a workaround and reset the GPIO+SCU manually.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But for a brownout reset, we would have to catch the BOD irq. We didnt manage to do that jet.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Still, this is a lot of workarounds for a problems thats basically in the chip, why doesnt it reset completely? How can we make it reset? I just found some snippets that its related to debug beeing enabled. But no information on how to disable debug for our configuration...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope anybody can help on this..&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Simon&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 19:20:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Reset-fails-because-chip-not-completely-reset/m-p/593460#M22501</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T19:20:56Z</dc:date>
    </item>
    <item>
      <title>Re: Reset fails because chip not completely reset</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Reset-fails-because-chip-not-completely-reset/m-p/593461#M22502</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by mc on Mon Jul 21 17:25:31 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi Simon,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;You can have pullup on ISP pin and you can use following instructions to reset the device.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;*(volatile unsigned int *)0x40043100 = 0x10400000; //memmap with boot ROM address&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;*(volatile unsigned int *)0x40053100 =(1&amp;lt;&amp;lt;0); // Core reset&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 19:20:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Reset-fails-because-chip-not-completely-reset/m-p/593461#M22502</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T19:20:57Z</dc:date>
    </item>
    <item>
      <title>Re: Reset fails because chip not completely reset</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Reset-fails-because-chip-not-completely-reset/m-p/593462#M22503</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by samc77 on Mon Jul 21 23:23:44 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks for your quick answer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;for the intentional reboot, we are doing it very similiar to your version. (I think there is a typo, should be 0x40053100 for both lines, right?)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Doing it exactly your way didnt work for some reason, but replacing the Core Reset by a WDT reset works.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Surely, its not enough to reset the GPIO and ETHERNET, instead its GPIO, SCU and not sure if needed: EMC. (If the SCU is not reset, the pin FUNC will stay at EMC and it will keep in control over the pins)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So our code is this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // reset the SCU, EMC, GPIO&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // this is required to make sure that the pins A6 and A9 are hi level during reset.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // if they are not, the system will not boot from SPIFI and instead end up in the ISP mode&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LPC_RGU-&amp;gt;RESET_CTRL0 = (1&amp;lt;&amp;lt;9) | (1&amp;lt;&amp;lt;21) | (1&amp;lt;&amp;lt;28);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; wdt_reset();&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; __disable_irq();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; __disable_fault_irq();&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; st_Wdt_Config w;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; w.wdtReset = 1;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; w.wdtProtect = 0;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; w.wdtWarningVal = 0;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; w.wdtTmrConst = 10000;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; WWDT_Init();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; WWDT_Configure(w);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; WWDT_Start();&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; while(1);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;That works reliably.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;BUT: if a watchdog timeout occurs, normally, the reset is triggered directly. That will cause the chip to enter the ISP most of the time.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Now, we catch the WDT IRQ and disabled the WDT RESET. That works again.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But will not work in case IRQs are disabled, and that happens to be at some parts of the code.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So its not a real solution, just a 90% workaround.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So my question still is: is it possible to force the chip into the "normal" operation mode, not debug, where it really resets completely on WDT reset?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Simon&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 19:20:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Reset-fails-because-chip-not-completely-reset/m-p/593462#M22503</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T19:20:57Z</dc:date>
    </item>
    <item>
      <title>Re: Reset fails because chip not completely reset</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Reset-fails-because-chip-not-completely-reset/m-p/593463#M22504</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by mc on Fri Jul 25 14:50:18 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi Simon,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Both lines are correct and&amp;nbsp; there is no typo. Reset control register address is 0x4005 3100 and memmap register address is 0x4004 3100.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Check&amp;nbsp; page 128/1420 and 213/1420 UM10503 Rev. 1.8 — 28 January 2014.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 19:20:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Reset-fails-because-chip-not-completely-reset/m-p/593463#M22504</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T19:20:58Z</dc:date>
    </item>
  </channel>
</rss>

