<?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 LPC4357: how to setting M4 core frequency at most 204MHz? in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC4357-how-to-setting-M4-core-frequency-at-most-204MHz/m-p/873889#M34866</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN title=""&gt;I'm trying to implement PLL1 to set the main clock frequency for the M4 core at most 204MHz.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN title=""&gt;To set the PLL1 with the PLL1_CTRL register there are no problems.&lt;/SPAN&gt; &lt;SPAN title=""&gt;I perform the following instructions:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN title=""&gt;1) Set AUTOBLOCK&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN title=""&gt;2) Set M and N&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN title=""&gt;3) wait LOCK&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN title=""&gt;4) Set DIRECT&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN title=""&gt;5) wait LOCK&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN title=""&gt;6) clear BYPASS&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN title=""&gt;7) wait LOCK&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN title=""&gt;Each setting is set and the LOCK in PLL1_STAT is always 0.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN title=""&gt;Unfortunately, when I finally select the CLK_SEL of BASE_M4_CLK at 0x9, the next instruction is no longer executed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN title=""&gt;Even if I do this last setting before setting up the PLL1, it does the same problem.&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN title=""&gt;What could be the reason?&lt;SPAN&gt;&lt;SPAN title=""&gt;&lt;SPAN&gt;&lt;SPAN title=""&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 06 Mar 2019 12:03:31 GMT</pubDate>
    <dc:creator>astrogreco</dc:creator>
    <dc:date>2019-03-06T12:03:31Z</dc:date>
    <item>
      <title>LPC4357: how to setting M4 core frequency at most 204MHz?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC4357-how-to-setting-M4-core-frequency-at-most-204MHz/m-p/873889#M34866</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN title=""&gt;I'm trying to implement PLL1 to set the main clock frequency for the M4 core at most 204MHz.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN title=""&gt;To set the PLL1 with the PLL1_CTRL register there are no problems.&lt;/SPAN&gt; &lt;SPAN title=""&gt;I perform the following instructions:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN title=""&gt;1) Set AUTOBLOCK&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN title=""&gt;2) Set M and N&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN title=""&gt;3) wait LOCK&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN title=""&gt;4) Set DIRECT&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN title=""&gt;5) wait LOCK&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN title=""&gt;6) clear BYPASS&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN title=""&gt;7) wait LOCK&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN title=""&gt;Each setting is set and the LOCK in PLL1_STAT is always 0.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN title=""&gt;Unfortunately, when I finally select the CLK_SEL of BASE_M4_CLK at 0x9, the next instruction is no longer executed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN title=""&gt;Even if I do this last setting before setting up the PLL1, it does the same problem.&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN title=""&gt;What could be the reason?&lt;SPAN&gt;&lt;SPAN title=""&gt;&lt;SPAN&gt;&lt;SPAN title=""&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Mar 2019 12:03:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC4357-how-to-setting-M4-core-frequency-at-most-204MHz/m-p/873889#M34866</guid>
      <dc:creator>astrogreco</dc:creator>
      <dc:date>2019-03-06T12:03:31Z</dc:date>
    </item>
    <item>
      <title>Re: LPC4357: how to setting M4 core frequency at most 204MHz?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC4357-how-to-setting-M4-core-frequency-at-most-204MHz/m-p/873890#M34867</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A few reasons for this:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;You execute from internal flash and after switching to 204MHz the waitstate setting do no longer fit. So set the wait states to the maximum first and then switch to higher frequency.&lt;/LI&gt;&lt;LI&gt;Other components connected to this PLL output might cause a crash if they are not prepared for this step&lt;/LI&gt;&lt;LI&gt;You execute from external QSPI flash and the interface speed does no longer match the specifcation when switching to 204MHz&lt;/LI&gt;&lt;LI&gt;Power supply problems due to the higher power demand at 204MHz (in case it's your own board development)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Bernhard.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Mar 2019 12:57:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC4357-how-to-setting-M4-core-frequency-at-most-204MHz/m-p/873890#M34867</guid>
      <dc:creator>bernhardfink</dc:creator>
      <dc:date>2019-03-06T12:57:12Z</dc:date>
    </item>
    <item>
      <title>Re: LPC4357: how to setting M4 core frequency at most 204MHz?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC4357-how-to-setting-M4-core-frequency-at-most-204MHz/m-p/873891#M34868</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN title=""&gt;Thanks for the reply.&lt;/SPAN&gt; &lt;SPAN title=""&gt;I set the PLL as the first operation.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN title=""&gt;I solved, the problem was that the PLL1 was not enabled, ie bit 0 (PD) was not clear.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN title=""&gt;However now it works but I have to skip the wait LOCK phases.&lt;/SPAN&gt; &lt;SPAN title=""&gt;In fact, the LOCK bit of PLL1_STAT is never set to 1.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN title=""&gt;I set the PLL1_CTRL register in several steps, but when I check the LOCK it is always 0.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="" title=""&gt;If I skip the LOCK check the process goes on all the same and everything works.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class="" title=""&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class="" title=""&gt;Attached the function I use.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class="" title=""&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class="" title=""&gt;What could be the problem of LOCK bit?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Mar 2019 16:03:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC4357-how-to-setting-M4-core-frequency-at-most-204MHz/m-p/873891#M34868</guid>
      <dc:creator>astrogreco</dc:creator>
      <dc:date>2019-03-07T16:03:18Z</dc:date>
    </item>
    <item>
      <title>Re: LPC4357: how to setting M4 core frequency at most 204MHz?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC4357-how-to-setting-M4-core-frequency-at-most-204MHz/m-p/873892#M34869</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I must admit that I'm a little bit out of business for this LPC4300 platform, but after a short look into your code I have the follwing recommendations:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;If you use a variable to poll for a status which changes with an event from the outside, then declare your variable with the keyword volatile. Otherwise the compiler could do some ugly optimization.&lt;/LI&gt;&lt;LI&gt;Don't poll on register flags (like the lock bit) in a while loop. At least add some NOP() in the while loop.&lt;/LI&gt;&lt;LI&gt;If it is recommended to wait after a specific setting, then do it with a simple wait() function. For safety reasons you can then read the lock bit to confirm that it is set.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Bernhard.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Mar 2019 17:01:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC4357-how-to-setting-M4-core-frequency-at-most-204MHz/m-p/873892#M34869</guid>
      <dc:creator>bernhardfink</dc:creator>
      <dc:date>2019-03-07T17:01:42Z</dc:date>
    </item>
    <item>
      <title>Re: LPC4357: how to setting M4 core frequency at most 204MHz?</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC4357-how-to-setting-M4-core-frequency-at-most-204MHz/m-p/873893#M34870</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class="" title=""&gt;Thank you very much.&lt;/SPAN&gt; &lt;SPAN title=""&gt;I solved the problem.&lt;/SPAN&gt; &lt;SPAN class="" title=""&gt;NOP operations&amp;nbsp; &lt;STRONG&gt;are required&lt;/STRONG&gt;.&lt;/SPAN&gt; &lt;SPAN class="" title=""&gt;Now after every PLL1 setting the LOCK bit is set to 1 and the process goes on correctly.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN class="" title=""&gt;Attached the function used&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Mar 2019 14:19:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC4357-how-to-setting-M4-core-frequency-at-most-204MHz/m-p/873893#M34870</guid>
      <dc:creator>astrogreco</dc:creator>
      <dc:date>2019-03-08T14:19:38Z</dc:date>
    </item>
  </channel>
</rss>

