<?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 LPC43xx Chip_Clock_EnableCrystal Hard fault advisory in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC43xx-Chip-Clock-EnableCrystal-Hard-fault-advisory/m-p/984018#M38812</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am posting this as I ran into this issue after starting some new development with the LPC4357.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The function&amp;nbsp;void Chip_Clock_EnableCrystal(void) in the chip support library has a while loop delay to pause for the crystal osc. to stablize before engaging the PLL.&amp;nbsp; &amp;nbsp;The "stock" value of 1000 is not quite enough for many crystals and/or layouts.&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using the embedded artists&amp;nbsp; 4357 developer kit and found that I can get a hardfault during the PLL init phase about 50% of the time.&amp;nbsp; Simply making this larger fixes the issue.&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;In my case I make it very large (100000)&amp;nbsp; and the PLL starts 100%.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No to need to respond, I am just posting this as an advisory.&amp;nbsp; &amp;nbsp;I ran into this back in 2013 with the LPCOpen libraries and completely forgot I had versions of the libraries with this patched.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 16 Dec 2019 14:06:27 GMT</pubDate>
    <dc:creator>Eli_H</dc:creator>
    <dc:date>2019-12-16T14:06:27Z</dc:date>
    <item>
      <title>LPC43xx Chip_Clock_EnableCrystal Hard fault advisory</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC43xx-Chip-Clock-EnableCrystal-Hard-fault-advisory/m-p/984018#M38812</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am posting this as I ran into this issue after starting some new development with the LPC4357.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The function&amp;nbsp;void Chip_Clock_EnableCrystal(void) in the chip support library has a while loop delay to pause for the crystal osc. to stablize before engaging the PLL.&amp;nbsp; &amp;nbsp;The "stock" value of 1000 is not quite enough for many crystals and/or layouts.&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using the embedded artists&amp;nbsp; 4357 developer kit and found that I can get a hardfault during the PLL init phase about 50% of the time.&amp;nbsp; Simply making this larger fixes the issue.&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;In my case I make it very large (100000)&amp;nbsp; and the PLL starts 100%.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No to need to respond, I am just posting this as an advisory.&amp;nbsp; &amp;nbsp;I ran into this back in 2013 with the LPCOpen libraries and completely forgot I had versions of the libraries with this patched.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Dec 2019 14:06:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC43xx-Chip-Clock-EnableCrystal-Hard-fault-advisory/m-p/984018#M38812</guid>
      <dc:creator>Eli_H</dc:creator>
      <dc:date>2019-12-16T14:06:27Z</dc:date>
    </item>
    <item>
      <title>Re: LPC43xx Chip_Clock_EnableCrystal Hard fault advisory</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC43xx-Chip-Clock-EnableCrystal-Hard-fault-advisory/m-p/984019#M38813</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Eli,&lt;/P&gt;&lt;P&gt;Regarding the snippet of code, I think it is okay if you increase the delay as 100 000, it just waits for the stabilization of the&amp;nbsp; crystal.&lt;/P&gt;&lt;P&gt;Hope it can help you&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;XiangJun rong&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* Enables the crystal oscillator */&lt;BR /&gt;void Chip_Clock_EnableCrystal(void)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;volatile uint32_t delay = 1000;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;uint32_t OldCrystalConfig = LPC_CGU-&amp;gt;XTAL_OSC_CTRL;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;/* Clear bypass mode */&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;OldCrystalConfig &amp;amp;= (~2);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;if (OldCrystalConfig != LPC_CGU-&amp;gt;XTAL_OSC_CTRL) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;LPC_CGU-&amp;gt;XTAL_OSC_CTRL = OldCrystalConfig;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;/* Enable crystal oscillator */&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;OldCrystalConfig &amp;amp;= (~1);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;if (OscRateIn &amp;gt;= 20000000) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;OldCrystalConfig |= 4;&amp;nbsp;&amp;nbsp; &amp;nbsp;/* Set high frequency mode */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;LPC_CGU-&amp;gt;XTAL_OSC_CTRL = OldCrystalConfig;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;/* Delay for 250uSec */&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;while(delay--) {}&lt;BR /&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Dec 2019 09:12:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC43xx-Chip-Clock-EnableCrystal-Hard-fault-advisory/m-p/984019#M38813</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2019-12-17T09:12:11Z</dc:date>
    </item>
  </channel>
</rss>

