<?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 lpc4337 problem while setting PLL after reset in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/lpc4337-problem-while-setting-PLL-after-reset/m-p/594389#M22623</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by PeterZos on Fri Apr 17 03:29:46 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;We are designing a new product based on lpc4337 and I noticed a problem. While resetting the cpu with NVIC_SystemReset the firmware doesn't start. This happens only a few times a day.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried to debug the problem, so I took the basic "FreeRTOS Blinky" from LPCOpen v2.16 for LPCXpresso sample and add the code to reset the cpu after a few minutes. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;After a few hours of running this sample, the lpc4337 hangs in HardFault_Handler.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I examined the stack with openocd and found that cpu hangs while setting pll in function Chip_SetupCoreClock().&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Could you please help me solve this problem&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Attachments:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;lpc4337_test.zip - modified LPCXpresso blinky sample, which in hangs after a few (12) hours&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;openocd_log.txt - openocd output &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;disassembled_c_code.txt - disassembled Chip_SetupCoreClock&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Peter&lt;/SPAN&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-338086"&gt;lpc4337_test.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-338086"&gt;openocd_log.txt.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-338086"&gt;disassembled_c_code.txt.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 19:21:57 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T19:21:57Z</dc:date>
    <item>
      <title>lpc4337 problem while setting PLL after reset</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/lpc4337-problem-while-setting-PLL-after-reset/m-p/594389#M22623</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by PeterZos on Fri Apr 17 03:29:46 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;We are designing a new product based on lpc4337 and I noticed a problem. While resetting the cpu with NVIC_SystemReset the firmware doesn't start. This happens only a few times a day.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried to debug the problem, so I took the basic "FreeRTOS Blinky" from LPCOpen v2.16 for LPCXpresso sample and add the code to reset the cpu after a few minutes. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;After a few hours of running this sample, the lpc4337 hangs in HardFault_Handler.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I examined the stack with openocd and found that cpu hangs while setting pll in function Chip_SetupCoreClock().&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Could you please help me solve this problem&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Attachments:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;lpc4337_test.zip - modified LPCXpresso blinky sample, which in hangs after a few (12) hours&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;openocd_log.txt - openocd output &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;disassembled_c_code.txt - disassembled Chip_SetupCoreClock&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Peter&lt;/SPAN&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-338086"&gt;lpc4337_test.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-338086"&gt;openocd_log.txt.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-338086"&gt;disassembled_c_code.txt.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 19:21:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/lpc4337-problem-while-setting-PLL-after-reset/m-p/594389#M22623</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T19:21:57Z</dc:date>
    </item>
    <item>
      <title>Re: lpc4337 problem while setting PLL after reset</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/lpc4337-problem-while-setting-PLL-after-reset/m-p/594390#M22624</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by PeterZos on Mon Sep 28 04:10:39 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;We made a workaround and connect P6_9 to reset circuit (it could also be directly to CPU's RESET pin - active low)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We also write HardFault handler:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;__attribute__ ((section(".after_vectors")))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;void HardFault_Handler(void)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;while (1) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; volatile uint32_t i;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Chip_SCU_PinMuxSet(6, 9, SCU_MODE_FUNC0);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Chip_GPIO_SetPinDIROutput(LPC_GPIO_PORT, 3, 5);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for (i=0;1&amp;lt;1000000;i++)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Chip_GPIO_SetPinState(LPC_GPIO_PORT, 3, 5, (bool) false);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; NVIC_SystemReset();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;after reset the pin P6_9 is defined as input pull-up enabled&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;so the cpu is not in reset state.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;if the HardFault handler is triggered, pin P6_9 is set to output and pin state is set to low so the chip reset it self.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Peter Žos&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 19:21:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/lpc4337-problem-while-setting-PLL-after-reset/m-p/594390#M22624</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T19:21:58Z</dc:date>
    </item>
    <item>
      <title>Re: lpc4337 problem while setting PLL after reset</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/lpc4337-problem-while-setting-PLL-after-reset/m-p/594391#M22625</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by starblue on Mon Sep 28 04:35:52 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Take a look at a recent Errata Sheet:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;"RESET.2 [...] CMSIS call NVIC_SystemReset() uses PERIPH_RST internally and is also non-functional."&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 19:21:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/lpc4337-problem-while-setting-PLL-after-reset/m-p/594391#M22625</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T19:21:59Z</dc:date>
    </item>
    <item>
      <title>Re: lpc4337 problem while setting PLL after reset</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/lpc4337-problem-while-setting-PLL-after-reset/m-p/594392#M22626</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 Sep 28 12:01:00 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Could you please replace NVIC_SystemReset() by below two lines of code?&amp;nbsp; This uses core reset instead of system reset.&lt;/SPAN&gt;&lt;BR /&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 19:22:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/lpc4337-problem-while-setting-PLL-after-reset/m-p/594392#M22626</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T19:22:00Z</dc:date>
    </item>
  </channel>
</rss>

