<?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: Bug in system_LPC54628.c in the SystemCoreClockUpdate() function. in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/Bug-in-system-LPC54628-c-in-the-SystemCoreClockUpdate-function/m-p/866299#M34545</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Andy,&lt;/P&gt;&lt;P&gt;I agree with you that the last line should be &lt;EM&gt;&amp;nbsp;clkRate =&lt;STRONG&gt; clkRate&lt;/STRONG&gt; * 2;&lt;/EM&gt; rather than &lt;EM&gt;clkRate =&lt;/EM&gt;&lt;STRONG&gt;&lt;EM&gt; workRate&lt;/EM&gt;&lt;/STRONG&gt;&lt;EM&gt; * 2;&lt;/EM&gt; the PLL multply is 2*M.&lt;/P&gt;&lt;P&gt;If the original code were correct, the postdiv would be invalid.&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;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 19 Mar 2019 09:33:10 GMT</pubDate>
    <dc:creator>xiangjun_rong</dc:creator>
    <dc:date>2019-03-19T09:33:10Z</dc:date>
    <item>
      <title>Bug in system_LPC54628.c in the SystemCoreClockUpdate() function.</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Bug-in-system-LPC54628-c-in-the-SystemCoreClockUpdate-function/m-p/866298#M34544</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think I have found a bug in system_LPC54628.c in the SystemCoreClockUpdate() function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The&amp;nbsp;observation is that when I run the core at 220MHz the&amp;nbsp;SystemCoreClock variable ends up with 440,000,000. Measuring frequencies with a scope shows the clock to be correct at 220MHz. The knock on effect of this is that RTOS timers and scheduling run at the wrong speed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think the bug lies in these lines:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;/* MDEC used for rate */&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;workRate = (uint64_t)clkRate * (uint64_t)findPllMMult(SYSCON-&amp;gt;SYSPLLCTRL, SYSCON-&amp;gt;SYSPLLMDEC);&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;clkRate = workRate / ((uint64_t)postdiv);&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;EM&gt;clkRate =&lt;/EM&gt;&lt;STRONG&gt;&lt;EM&gt; workRate&lt;/EM&gt;&lt;/STRONG&gt;&lt;EM&gt; * 2; /* PLL CCO output is divided by 2 before to M-Divider */&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think the last line should read&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;clkRate =&lt;STRONG&gt; clkRate&lt;/STRONG&gt; * 2; /* PLL CCO output is divided by 2 before to M-Divider */&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Mar 2019 12:00:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Bug-in-system-LPC54628-c-in-the-SystemCoreClockUpdate-function/m-p/866298#M34544</guid>
      <dc:creator>andrewfisher</dc:creator>
      <dc:date>2019-03-18T12:00:32Z</dc:date>
    </item>
    <item>
      <title>Re: Bug in system_LPC54628.c in the SystemCoreClockUpdate() function.</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Bug-in-system-LPC54628-c-in-the-SystemCoreClockUpdate-function/m-p/866299#M34545</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Andy,&lt;/P&gt;&lt;P&gt;I agree with you that the last line should be &lt;EM&gt;&amp;nbsp;clkRate =&lt;STRONG&gt; clkRate&lt;/STRONG&gt; * 2;&lt;/EM&gt; rather than &lt;EM&gt;clkRate =&lt;/EM&gt;&lt;STRONG&gt;&lt;EM&gt; workRate&lt;/EM&gt;&lt;/STRONG&gt;&lt;EM&gt; * 2;&lt;/EM&gt; the PLL multply is 2*M.&lt;/P&gt;&lt;P&gt;If the original code were correct, the postdiv would be invalid.&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Mar 2019 09:33:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Bug-in-system-LPC54628-c-in-the-SystemCoreClockUpdate-function/m-p/866299#M34545</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2019-03-19T09:33:10Z</dc:date>
    </item>
  </channel>
</rss>

