<?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>LPC MicrocontrollersのトピックSystemCoreClockUpdate()</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/SystemCoreClockUpdate/m-p/565908#M17189</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by mikewi on Wed Apr 11 03:08:11 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;The function &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;void SystemCoreClockUpdate (void) appears to be mandated by CMSIS with the folowing functionality:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;"Updates the variable SystemCoreClock and must be called whenever the core clock is changed during program execution. SystemCoreClockUpdate() evaluates the clock register settings and calculates the current core clock."&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The only implementations that I have seen are naive ones setting predefined fixed values not functions. (system_ARMCM4.c attached)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Some examples also have the function exterened but not apparently implemented.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Am I missing something in the NXP library code?&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-337980"&gt;system_ARMCM4.c.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 18:49:09 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T18:49:09Z</dc:date>
    <item>
      <title>SystemCoreClockUpdate()</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/SystemCoreClockUpdate/m-p/565908#M17189</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by mikewi on Wed Apr 11 03:08:11 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;The function &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;void SystemCoreClockUpdate (void) appears to be mandated by CMSIS with the folowing functionality:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;"Updates the variable SystemCoreClock and must be called whenever the core clock is changed during program execution. SystemCoreClockUpdate() evaluates the clock register settings and calculates the current core clock."&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The only implementations that I have seen are naive ones setting predefined fixed values not functions. (system_ARMCM4.c attached)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Some examples also have the function exterened but not apparently implemented.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Am I missing something in the NXP library code?&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-337980"&gt;system_ARMCM4.c.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:49:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/SystemCoreClockUpdate/m-p/565908#M17189</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T18:49:09Z</dc:date>
    </item>
    <item>
      <title>Re: SystemCoreClockUpdate()</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/SystemCoreClockUpdate/m-p/565909#M17190</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by PhilYoung on Fri Apr 13 09:49:06 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;the latest demo code provides some more detailed functions for this, as used in the fastboot example.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The problem however is computing some of the other values for setting up the PLL, particularly if you need to set up the audio or USB PLL, I can't find the algorithm for these but there is a program from NXP to compute them and provide the values to write into the registers.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also, when updating the core clock you need to be careful about switching directly to a high speed since this can crash the device ( due to a bug that still hasn't made it into the errata ), you may need to switch frequency in stages or the CPU may crash.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;personally I chose not to use the supplied functions since they build a cross reference table of frequencies and legal options and test everything, this has a significant RAM overhead and is completely unnecessary in most embedded systems where the frequency plan is determined once and fixed for the application lifetime.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Setting up the clocks then just needs a few lines of code.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Phil.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:49:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/SystemCoreClockUpdate/m-p/565909#M17190</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T18:49:10Z</dc:date>
    </item>
  </channel>
</rss>

