<?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 LPC1857- stepping up/down PLL speed in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1857-stepping-up-down-PLL-speed/m-p/541399#M12272</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by vivien.wong on Sun Jan 31 22:08:43 MST 2016&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi there,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; I'm using the LPC1857 and I'm running at 96MHz with a clk in crystal of 12MHz. At some point of the code I wish to step up to 180MHz for higher performance and when that is done, i want to step back down to 96MHz. What is the best way to do this? Right now, i'm setting it this way:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; void SystemSetClockRateOptimalCurrent()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;/* Setup PLL for maximum clock */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Chip_Clock_SetupMainPLLHz(CLKIN_CRYSTAL, CRYSTAL_MAIN_FREQ_IN, CLOCK_FREQ_LOW, CLOCK_FREQ_LOW);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Chip_Clock_SetBaseClock(CLK_BASE_MX, CLKIN_MAINPLL, true, false);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Chip_CREG_SetFlashAcceleration(CLOCK_FREQ_LOW);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;void SystemCoreClockUpdate(void)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;/* CPU core speed */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;SystemCoreClock = Chip_Clock_GetRate(CLK_MX_MXCORE);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; Do i just setup for 180MHz and update the system core clock and then setup for 96MHz and do the same? Is there a better way in doing this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Vivien&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 18:25:13 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T18:25:13Z</dc:date>
    <item>
      <title>LPC1857- stepping up/down PLL speed</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1857-stepping-up-down-PLL-speed/m-p/541399#M12272</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by vivien.wong on Sun Jan 31 22:08:43 MST 2016&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi there,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; I'm using the LPC1857 and I'm running at 96MHz with a clk in crystal of 12MHz. At some point of the code I wish to step up to 180MHz for higher performance and when that is done, i want to step back down to 96MHz. What is the best way to do this? Right now, i'm setting it this way:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; void SystemSetClockRateOptimalCurrent()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;/* Setup PLL for maximum clock */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Chip_Clock_SetupMainPLLHz(CLKIN_CRYSTAL, CRYSTAL_MAIN_FREQ_IN, CLOCK_FREQ_LOW, CLOCK_FREQ_LOW);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Chip_Clock_SetBaseClock(CLK_BASE_MX, CLKIN_MAINPLL, true, false);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Chip_CREG_SetFlashAcceleration(CLOCK_FREQ_LOW);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;void SystemCoreClockUpdate(void)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;/* CPU core speed */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;SystemCoreClock = Chip_Clock_GetRate(CLK_MX_MXCORE);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; Do i just setup for 180MHz and update the system core clock and then setup for 96MHz and do the same? Is there a better way in doing this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Vivien&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 18:25:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1857-stepping-up-down-PLL-speed/m-p/541399#M12272</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T18:25:13Z</dc:date>
    </item>
  </channel>
</rss>

