<?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中的主题 Problem with PLL clock on LPC54102</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/Problem-with-PLL-clock-on-LPC54102/m-p/552644#M14424</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;I have LPC54102 xpresso evaluation board for LPC54102j514BD64 and I am asked to writing the code to run the unit at maximum frequency,100 MHz, or let say 96 MHz.&lt;/P&gt;&lt;P&gt;the problem is that I followed every single step in data sheet and tried to toggling the on board LED with pll output clock. I Know that there is a library there bit I am restricted to do not use any library. the problem is that after I switching from IRC clock to Pll out clock the software can not execute any instruction anymore and I got the following error:&lt;/P&gt;&lt;P&gt;No source available for "0x5f809602".&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;here is my code:&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#define AHBCLKCTRL0 *(volatile unsigned long *)(0x400000C0)&lt;/P&gt;&lt;P&gt;//defining the address of base of GPIO direction register&lt;/P&gt;&lt;P&gt;#define GPIO_BASE 0x1c000000&lt;/P&gt;&lt;P&gt;#define GPIO_DIRECTION_OFFSET 0x2000&lt;/P&gt;&lt;P&gt;#define GPIO1_DIRECTION_OFFSET 0x2004&lt;/P&gt;&lt;P&gt;#define GPIO_PORT0_DIRECTION_REGISTER *(volatile unsigned long *)(GPIO_BASE+GPIO_DIRECTION_OFFSET)&lt;/P&gt;&lt;P&gt;#define GPIO_PORT1_DIRECTION_REGISTER *(volatile unsigned long *)(GPIO_BASE+GPIO1_DIRECTION_OFFSET)&lt;/P&gt;&lt;P&gt;//defining the GPIO Register address for toggling&lt;/P&gt;&lt;P&gt;#define GPIO_TOGGLE_OFFSET 0x2300&lt;/P&gt;&lt;P&gt;#define GPIO_PORT0_TOGGLE_REGISTER *(volatile unsigned long *)(GPIO_BASE+GPIO_TOGGLE_OFFSET)&lt;/P&gt;&lt;P&gt;//defining GPIO port0 pin register&lt;/P&gt;&lt;P&gt;#define GPIO_PORT0_PIN_REGISTER_OFFSET 0x2100&lt;/P&gt;&lt;P&gt;#define GPIO_PORT0_PIN_REGISTER&amp;nbsp;&amp;nbsp;&amp;nbsp; *(volatile unsigned long *)(GPIO_BASE+GPIO_PORT0_PIN_REGISTER_OFFSET)&lt;/P&gt;&lt;P&gt;//define the main clock register&lt;/P&gt;&lt;P&gt;#define MAINCLKSELB *(volatile unsigned long *)(0x40000084)&lt;/P&gt;&lt;P&gt;//define the divider value&lt;/P&gt;&lt;P&gt;#define AHBCLKDIV *(volatile unsigned long *)(0x40000100)&lt;/P&gt;&lt;P&gt;// define the selector of PLL input&lt;/P&gt;&lt;P&gt;#define SYSPLLCLKSEL *(volatile unsigned long *)(0x400000A0)&lt;/P&gt;&lt;P&gt;//define system pll control register&lt;/P&gt;&lt;P&gt;#define SYSPLLCTRL *(volatile unsigned long *)(0x400001B0)&lt;/P&gt;&lt;P&gt;//define the main clock source register&lt;/P&gt;&lt;P&gt;#define MAINCLKSELA *(volatile unsigned long *)(0x40000080)&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;//define System PLL N-divider register&lt;/P&gt;&lt;P&gt;#define SYSPLLNDEC *(volatile unsigned long *)(0x400001B8)&lt;/P&gt;&lt;P&gt;// define pll p dec&lt;/P&gt;&lt;P&gt;#define SYSPLLPDEC *(volatile unsigned long *)(0x400001BC)&lt;/P&gt;&lt;P&gt;// define pll setting MDEC&lt;/P&gt;&lt;P&gt;#define SYSPLLSSCTRL0 *(volatile unsigned long *)(0x400001C0)&lt;/P&gt;&lt;P&gt;//define RTC oscillator control register&lt;/P&gt;&lt;P&gt;#define RTC_oscillator_control *(volatile unsigned long *)(0x40000190)&lt;/P&gt;&lt;P&gt;//define the source for asynchronize&lt;/P&gt;&lt;P&gt;#define ASYNCAPBCLKSELA *(volatile unsigned long *)(0x40080020)&lt;/P&gt;&lt;P&gt;// define the source for asyncronize&lt;/P&gt;&lt;P&gt;#define ASYNCAPBCLKSELB *(volatile unsigned long *)(0x40080024)&lt;/P&gt;&lt;P&gt;// define Asynchronous APB clock divider register&lt;/P&gt;&lt;P&gt;#define ASYNCCLKDIV *(volatile unsigned long *)(0x40080028)&lt;/P&gt;&lt;P&gt;//define ADC clock source select&lt;/P&gt;&lt;P&gt;#define ADCCLKSEL *(volatile unsigned long *)(0x4000008C)&lt;/P&gt;&lt;P&gt;//define ADC clock source divider&lt;/P&gt;&lt;P&gt;#define ADCCLKDIV *(volatile unsigned long *)(0x40000108)&lt;/P&gt;&lt;P&gt;//define CLKOUT clock source select register&lt;/P&gt;&lt;P&gt;#define CLKOUTSELA *(volatile unsigned long *)(0x40000094)&lt;/P&gt;&lt;P&gt;//define CLKOUT clock source select register&lt;/P&gt;&lt;P&gt;#define CLKOUTSELB *(volatile unsigned long *)(0x40000098)&lt;/P&gt;&lt;P&gt;//define CLKOUT clock divider register&lt;/P&gt;&lt;P&gt;#define CLKOUTDIV *(volatile unsigned long *)(0x4000010C)&lt;/P&gt;&lt;P&gt;//define the power register&lt;/P&gt;&lt;P&gt;#define PDRUNCFGSET *(volatile unsigned long *)(0x40000214)&lt;/P&gt;&lt;P&gt;#define PDRUNCFGCLR *(volatile unsigned long *)(0x40000218)&lt;/P&gt;&lt;P&gt;#define FREQMEAS_TARGET *(volatile unsigned long *)(0x40050164)&lt;/P&gt;&lt;P&gt;#define FREQMECTRL&amp;nbsp; *(volatile unsigned long *)(0x40000120)&lt;/P&gt;&lt;P&gt;#define FREQMEAS_REF *(volatile unsigned long *)(0x40050160)&lt;/P&gt;&lt;P&gt;#define CLKOUTSELA&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *(volatile unsigned long *)(0x40000094)&lt;/P&gt;&lt;P&gt;#define CLKOUTSELB&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *(volatile unsigned long *)(0x40000098)&lt;/P&gt;&lt;P&gt;#define CLKOUTDIV&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *(volatile unsigned long *)(0x4000010C)&lt;/P&gt;&lt;P&gt;#define SYSPLLSTAT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *(volatile unsigned long *)(0x400001B4)&lt;/P&gt;&lt;P&gt;#define AHBCLKCTRLSET0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *(volatile unsigned long *)(0x400000C8)&lt;/P&gt;&lt;P&gt;#define AHBCLKCTRLCLR0&amp;nbsp;&amp;nbsp;&amp;nbsp; *(volatile unsigned long *)(0x400000D0)&lt;/P&gt;&lt;P&gt;#define RTCOSCCTRL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *(volatile unsigned long *)(0x40000190)&lt;/P&gt;&lt;P&gt;#define CTRL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *(volatile unsigned long *)(0x400000C0)&lt;/P&gt;&lt;P&gt;#define AHBCLKCTRLSET1&amp;nbsp;&amp;nbsp;&amp;nbsp; *(volatile unsigned long *)(0x400000CC)&lt;/P&gt;&lt;P&gt;#define AHBCLKCTRL1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *(volatile unsigned long *)(0x400000C4)&lt;/P&gt;&lt;P&gt;#define SYSTICKCLKDIV&amp;nbsp;&amp;nbsp;&amp;nbsp; *(volatile unsigned long *)(0x400000E0)&lt;/P&gt;&lt;P&gt;#define IOCON_P021&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *(volatile unsigned long *)(0x4001C054)&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;int main(void)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;double x, y, sumProduct;&lt;/P&gt;&lt;P&gt;int i;&lt;/P&gt;&lt;P&gt;int k;&lt;/P&gt;&lt;P&gt;int k2;&lt;/P&gt;&lt;P&gt;int k3;&lt;/P&gt;&lt;P&gt;int s;&lt;/P&gt;&lt;P&gt;k=0;&lt;/P&gt;&lt;P&gt;k2=0;&lt;/P&gt;&lt;P&gt;k3=0;&lt;/P&gt;&lt;P&gt;i=0;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;x=0.00254987;&lt;/P&gt;&lt;P&gt;y=0.254895;&lt;/P&gt;&lt;P&gt;sumProduct=0;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;AHBCLKCTRLSET0 = (1&amp;lt;&amp;lt;13) | (1&amp;lt;&amp;lt;14) | (1&amp;lt;&amp;lt;15)&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SYSTICKCLKDIV = 0x1;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PDRUNCFGSET = (1&amp;lt;&amp;lt;22);&lt;/P&gt;&lt;P&gt;SYSPLLCLKSEL = 0x00;&lt;/P&gt;&lt;P&gt;SYSPLLCTRL = 0x00151d00;&lt;/P&gt;&lt;P&gt;SYSPLLSSCTRL0 = (1&amp;lt;&amp;lt;18) |&amp;nbsp; 0x7f55;&lt;/P&gt;&lt;P&gt;SYSPLLSSCTRL0 |= (1&amp;lt;&amp;lt;17);&lt;/P&gt;&lt;P&gt;SYSPLLSSCTRL0 &amp;amp;= ~(1&amp;lt;&amp;lt;17);&lt;/P&gt;&lt;P&gt;SYSPLLNDEC =&amp;nbsp; 0x01;&lt;/P&gt;&lt;P&gt;SYSPLLNDEC |= (1&amp;lt;&amp;lt;10);&lt;/P&gt;&lt;P&gt;SYSPLLNDEC &amp;amp;= ~(1&amp;lt;&amp;lt;10);&lt;/P&gt;&lt;P&gt;SYSPLLPDEC =&amp;nbsp; 0x7f;&lt;/P&gt;&lt;P&gt;SYSPLLPDEC |= (1&amp;lt;&amp;lt;7);&lt;/P&gt;&lt;P&gt;SYSPLLPDEC &amp;amp;= ~(1&amp;lt;&amp;lt;7);&lt;/P&gt;&lt;P&gt;PDRUNCFGCLR = (1&amp;lt;&amp;lt;22);&lt;/P&gt;&lt;P&gt;k = SYSPLLSTAT;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;while (i&amp;lt;1000000)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; i++;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; k = SYSPLLSTAT;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IOCON_P021 = 0x1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; MAINCLKSELB = 0x02;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; GPIO_PORT0_DIRECTION_REGISTER |= (0x40000000);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; while (1){&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; GPIO_PORT0_TOGGLE_REGISTER |= (0x40000000);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for(i=0;i&amp;lt;100000;i++)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; sumProduct+=x*y;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return 0 ;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 08 Jul 2016 17:55:10 GMT</pubDate>
    <dc:creator>mostafadane</dc:creator>
    <dc:date>2016-07-08T17:55:10Z</dc:date>
    <item>
      <title>Problem with PLL clock on LPC54102</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Problem-with-PLL-clock-on-LPC54102/m-p/552644#M14424</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;I have LPC54102 xpresso evaluation board for LPC54102j514BD64 and I am asked to writing the code to run the unit at maximum frequency,100 MHz, or let say 96 MHz.&lt;/P&gt;&lt;P&gt;the problem is that I followed every single step in data sheet and tried to toggling the on board LED with pll output clock. I Know that there is a library there bit I am restricted to do not use any library. the problem is that after I switching from IRC clock to Pll out clock the software can not execute any instruction anymore and I got the following error:&lt;/P&gt;&lt;P&gt;No source available for "0x5f809602".&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;here is my code:&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#define AHBCLKCTRL0 *(volatile unsigned long *)(0x400000C0)&lt;/P&gt;&lt;P&gt;//defining the address of base of GPIO direction register&lt;/P&gt;&lt;P&gt;#define GPIO_BASE 0x1c000000&lt;/P&gt;&lt;P&gt;#define GPIO_DIRECTION_OFFSET 0x2000&lt;/P&gt;&lt;P&gt;#define GPIO1_DIRECTION_OFFSET 0x2004&lt;/P&gt;&lt;P&gt;#define GPIO_PORT0_DIRECTION_REGISTER *(volatile unsigned long *)(GPIO_BASE+GPIO_DIRECTION_OFFSET)&lt;/P&gt;&lt;P&gt;#define GPIO_PORT1_DIRECTION_REGISTER *(volatile unsigned long *)(GPIO_BASE+GPIO1_DIRECTION_OFFSET)&lt;/P&gt;&lt;P&gt;//defining the GPIO Register address for toggling&lt;/P&gt;&lt;P&gt;#define GPIO_TOGGLE_OFFSET 0x2300&lt;/P&gt;&lt;P&gt;#define GPIO_PORT0_TOGGLE_REGISTER *(volatile unsigned long *)(GPIO_BASE+GPIO_TOGGLE_OFFSET)&lt;/P&gt;&lt;P&gt;//defining GPIO port0 pin register&lt;/P&gt;&lt;P&gt;#define GPIO_PORT0_PIN_REGISTER_OFFSET 0x2100&lt;/P&gt;&lt;P&gt;#define GPIO_PORT0_PIN_REGISTER&amp;nbsp;&amp;nbsp;&amp;nbsp; *(volatile unsigned long *)(GPIO_BASE+GPIO_PORT0_PIN_REGISTER_OFFSET)&lt;/P&gt;&lt;P&gt;//define the main clock register&lt;/P&gt;&lt;P&gt;#define MAINCLKSELB *(volatile unsigned long *)(0x40000084)&lt;/P&gt;&lt;P&gt;//define the divider value&lt;/P&gt;&lt;P&gt;#define AHBCLKDIV *(volatile unsigned long *)(0x40000100)&lt;/P&gt;&lt;P&gt;// define the selector of PLL input&lt;/P&gt;&lt;P&gt;#define SYSPLLCLKSEL *(volatile unsigned long *)(0x400000A0)&lt;/P&gt;&lt;P&gt;//define system pll control register&lt;/P&gt;&lt;P&gt;#define SYSPLLCTRL *(volatile unsigned long *)(0x400001B0)&lt;/P&gt;&lt;P&gt;//define the main clock source register&lt;/P&gt;&lt;P&gt;#define MAINCLKSELA *(volatile unsigned long *)(0x40000080)&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;//define System PLL N-divider register&lt;/P&gt;&lt;P&gt;#define SYSPLLNDEC *(volatile unsigned long *)(0x400001B8)&lt;/P&gt;&lt;P&gt;// define pll p dec&lt;/P&gt;&lt;P&gt;#define SYSPLLPDEC *(volatile unsigned long *)(0x400001BC)&lt;/P&gt;&lt;P&gt;// define pll setting MDEC&lt;/P&gt;&lt;P&gt;#define SYSPLLSSCTRL0 *(volatile unsigned long *)(0x400001C0)&lt;/P&gt;&lt;P&gt;//define RTC oscillator control register&lt;/P&gt;&lt;P&gt;#define RTC_oscillator_control *(volatile unsigned long *)(0x40000190)&lt;/P&gt;&lt;P&gt;//define the source for asynchronize&lt;/P&gt;&lt;P&gt;#define ASYNCAPBCLKSELA *(volatile unsigned long *)(0x40080020)&lt;/P&gt;&lt;P&gt;// define the source for asyncronize&lt;/P&gt;&lt;P&gt;#define ASYNCAPBCLKSELB *(volatile unsigned long *)(0x40080024)&lt;/P&gt;&lt;P&gt;// define Asynchronous APB clock divider register&lt;/P&gt;&lt;P&gt;#define ASYNCCLKDIV *(volatile unsigned long *)(0x40080028)&lt;/P&gt;&lt;P&gt;//define ADC clock source select&lt;/P&gt;&lt;P&gt;#define ADCCLKSEL *(volatile unsigned long *)(0x4000008C)&lt;/P&gt;&lt;P&gt;//define ADC clock source divider&lt;/P&gt;&lt;P&gt;#define ADCCLKDIV *(volatile unsigned long *)(0x40000108)&lt;/P&gt;&lt;P&gt;//define CLKOUT clock source select register&lt;/P&gt;&lt;P&gt;#define CLKOUTSELA *(volatile unsigned long *)(0x40000094)&lt;/P&gt;&lt;P&gt;//define CLKOUT clock source select register&lt;/P&gt;&lt;P&gt;#define CLKOUTSELB *(volatile unsigned long *)(0x40000098)&lt;/P&gt;&lt;P&gt;//define CLKOUT clock divider register&lt;/P&gt;&lt;P&gt;#define CLKOUTDIV *(volatile unsigned long *)(0x4000010C)&lt;/P&gt;&lt;P&gt;//define the power register&lt;/P&gt;&lt;P&gt;#define PDRUNCFGSET *(volatile unsigned long *)(0x40000214)&lt;/P&gt;&lt;P&gt;#define PDRUNCFGCLR *(volatile unsigned long *)(0x40000218)&lt;/P&gt;&lt;P&gt;#define FREQMEAS_TARGET *(volatile unsigned long *)(0x40050164)&lt;/P&gt;&lt;P&gt;#define FREQMECTRL&amp;nbsp; *(volatile unsigned long *)(0x40000120)&lt;/P&gt;&lt;P&gt;#define FREQMEAS_REF *(volatile unsigned long *)(0x40050160)&lt;/P&gt;&lt;P&gt;#define CLKOUTSELA&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *(volatile unsigned long *)(0x40000094)&lt;/P&gt;&lt;P&gt;#define CLKOUTSELB&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *(volatile unsigned long *)(0x40000098)&lt;/P&gt;&lt;P&gt;#define CLKOUTDIV&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *(volatile unsigned long *)(0x4000010C)&lt;/P&gt;&lt;P&gt;#define SYSPLLSTAT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *(volatile unsigned long *)(0x400001B4)&lt;/P&gt;&lt;P&gt;#define AHBCLKCTRLSET0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *(volatile unsigned long *)(0x400000C8)&lt;/P&gt;&lt;P&gt;#define AHBCLKCTRLCLR0&amp;nbsp;&amp;nbsp;&amp;nbsp; *(volatile unsigned long *)(0x400000D0)&lt;/P&gt;&lt;P&gt;#define RTCOSCCTRL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *(volatile unsigned long *)(0x40000190)&lt;/P&gt;&lt;P&gt;#define CTRL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *(volatile unsigned long *)(0x400000C0)&lt;/P&gt;&lt;P&gt;#define AHBCLKCTRLSET1&amp;nbsp;&amp;nbsp;&amp;nbsp; *(volatile unsigned long *)(0x400000CC)&lt;/P&gt;&lt;P&gt;#define AHBCLKCTRL1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *(volatile unsigned long *)(0x400000C4)&lt;/P&gt;&lt;P&gt;#define SYSTICKCLKDIV&amp;nbsp;&amp;nbsp;&amp;nbsp; *(volatile unsigned long *)(0x400000E0)&lt;/P&gt;&lt;P&gt;#define IOCON_P021&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *(volatile unsigned long *)(0x4001C054)&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;int main(void)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;double x, y, sumProduct;&lt;/P&gt;&lt;P&gt;int i;&lt;/P&gt;&lt;P&gt;int k;&lt;/P&gt;&lt;P&gt;int k2;&lt;/P&gt;&lt;P&gt;int k3;&lt;/P&gt;&lt;P&gt;int s;&lt;/P&gt;&lt;P&gt;k=0;&lt;/P&gt;&lt;P&gt;k2=0;&lt;/P&gt;&lt;P&gt;k3=0;&lt;/P&gt;&lt;P&gt;i=0;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;x=0.00254987;&lt;/P&gt;&lt;P&gt;y=0.254895;&lt;/P&gt;&lt;P&gt;sumProduct=0;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;AHBCLKCTRLSET0 = (1&amp;lt;&amp;lt;13) | (1&amp;lt;&amp;lt;14) | (1&amp;lt;&amp;lt;15)&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SYSTICKCLKDIV = 0x1;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PDRUNCFGSET = (1&amp;lt;&amp;lt;22);&lt;/P&gt;&lt;P&gt;SYSPLLCLKSEL = 0x00;&lt;/P&gt;&lt;P&gt;SYSPLLCTRL = 0x00151d00;&lt;/P&gt;&lt;P&gt;SYSPLLSSCTRL0 = (1&amp;lt;&amp;lt;18) |&amp;nbsp; 0x7f55;&lt;/P&gt;&lt;P&gt;SYSPLLSSCTRL0 |= (1&amp;lt;&amp;lt;17);&lt;/P&gt;&lt;P&gt;SYSPLLSSCTRL0 &amp;amp;= ~(1&amp;lt;&amp;lt;17);&lt;/P&gt;&lt;P&gt;SYSPLLNDEC =&amp;nbsp; 0x01;&lt;/P&gt;&lt;P&gt;SYSPLLNDEC |= (1&amp;lt;&amp;lt;10);&lt;/P&gt;&lt;P&gt;SYSPLLNDEC &amp;amp;= ~(1&amp;lt;&amp;lt;10);&lt;/P&gt;&lt;P&gt;SYSPLLPDEC =&amp;nbsp; 0x7f;&lt;/P&gt;&lt;P&gt;SYSPLLPDEC |= (1&amp;lt;&amp;lt;7);&lt;/P&gt;&lt;P&gt;SYSPLLPDEC &amp;amp;= ~(1&amp;lt;&amp;lt;7);&lt;/P&gt;&lt;P&gt;PDRUNCFGCLR = (1&amp;lt;&amp;lt;22);&lt;/P&gt;&lt;P&gt;k = SYSPLLSTAT;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;while (i&amp;lt;1000000)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; i++;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; k = SYSPLLSTAT;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IOCON_P021 = 0x1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; MAINCLKSELB = 0x02;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; GPIO_PORT0_DIRECTION_REGISTER |= (0x40000000);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; while (1){&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; GPIO_PORT0_TOGGLE_REGISTER |= (0x40000000);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for(i=0;i&amp;lt;100000;i++)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; sumProduct+=x*y;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return 0 ;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jul 2016 17:55:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Problem-with-PLL-clock-on-LPC54102/m-p/552644#M14424</guid>
      <dc:creator>mostafadane</dc:creator>
      <dc:date>2016-07-08T17:55:10Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with PLL clock on LPC54102</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Problem-with-PLL-clock-on-LPC54102/m-p/552645#M14425</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Without looking at the details of your PLL programming, it seems like you're powering it down again before using it:&lt;/P&gt;&lt;P&gt;PDRUNCFGCLR = (1&amp;lt;&amp;lt;22);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also use the built-in power management routines (call the set_voltage() power profile API function to announce your operating frequency). The device will not run at 100 MHz if you don't.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jul 2016 05:35:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Problem-with-PLL-clock-on-LPC54102/m-p/552645#M14425</guid>
      <dc:creator>rolfmeeser</dc:creator>
      <dc:date>2016-07-12T05:35:31Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with PLL clock on LPC54102</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Problem-with-PLL-clock-on-LPC54102/m-p/552646#M14426</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; font-size: 10pt;"&gt;Apart from powering down the PLL. How do you call set_voltage API function. Datasheet is quite vague on details...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; font-size: 10pt;"&gt;So from datasheet:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 11px; font-family: Monaco; color: #931a68;"&gt;typedef&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;struct&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #006141;"&gt;_PWRD&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; {&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 11px; font-family: Monaco; color: #931a68;"&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp; &lt;/SPAN&gt;unsigned&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;int&lt;SPAN style="color: #000000;"&gt; (*&lt;/SPAN&gt;&lt;SPAN style="color: #0326cc;"&gt;set_pll&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;)(&lt;/SPAN&gt;unsigned&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;int&lt;SPAN style="color: #000000;"&gt; mul, &lt;/SPAN&gt;unsigned&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;int&lt;SPAN style="color: #000000;"&gt; inFreq);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 11px; font-family: Monaco; color: #931a68;"&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp; &lt;/SPAN&gt;unsigned&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;int&lt;SPAN style="color: #000000;"&gt; (*&lt;/SPAN&gt;&lt;SPAN style="color: #0326cc;"&gt;set_voltage&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;)(&lt;/SPAN&gt;unsigned&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;int&lt;SPAN style="color: #000000;"&gt; mode, &lt;/SPAN&gt;unsigned&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;int&lt;SPAN style="color: #000000;"&gt; desFreq);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 11px; font-family: Monaco;"&gt;&amp;nbsp; &lt;SPAN style="color: #931a68;"&gt;void&lt;/SPAN&gt; (*&lt;SPAN style="color: #0326cc;"&gt;power_mode_configure&lt;/SPAN&gt;)(&lt;SPAN style="color: #931a68;"&gt;unsigned&lt;/SPAN&gt; &lt;SPAN style="color: #931a68;"&gt;int&lt;/SPAN&gt; mode, &lt;SPAN style="color: #931a68;"&gt;unsigned&lt;/SPAN&gt; &lt;SPAN style="color: #931a68;"&gt;int&lt;/SPAN&gt; peripheral);&lt;/P&gt;&lt;P style="font-size: 11px; font-family: Monaco; color: #006141;"&gt;&lt;SPAN style="color: #000000;"&gt;}&lt;/SPAN&gt;PWRD&lt;SPAN style="color: #000000;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 11px; font-family: Monaco;"&gt;&lt;/P&gt;&lt;P style="font-size: 11px; font-family: Monaco;"&gt;&lt;SPAN style="color: #931a68;"&gt;#define&lt;/SPAN&gt; rom_driver_ptr (*(ROM)**) 0x03000200&lt;/P&gt;&lt;P style="font-size: 11px; font-family: Monaco;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;pPWRD = (PWRD*)(rom_driver_ptr-&amp;gt;pPWRD);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 11px; font-family: Monaco;"&gt;&lt;SPAN style="text-decoration: underline;"&gt;pPWRD-&amp;gt;set_voltage(??, 96000000);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 11px; font-family: Monaco;"&gt;&lt;/P&gt;&lt;P style="font-size: 11px; font-family: Monaco;"&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; font-size: 10pt;"&gt;What I dont understand from this is,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 11px; font-family: Monaco;"&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; font-size: 10pt;"&gt;- how is ROM defined&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 11px; font-family: Monaco;"&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; font-size: 10pt;"&gt;- what is pPWRD&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 11px; font-family: Monaco;"&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; font-size: 10pt;"&gt;- what is param0 in set_voltage. There is only description mode =0 for low power mode .. should I select some arbitrary value here ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 11px; font-family: Monaco;"&gt;&lt;/P&gt;&lt;P style="font-size: 11px; font-family: Monaco;"&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; font-size: 10pt;"&gt;Thanks...&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Aug 2016 20:56:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Problem-with-PLL-clock-on-LPC54102/m-p/552646#M14426</guid>
      <dc:creator>gossamer69</dc:creator>
      <dc:date>2016-08-15T20:56:05Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with PLL clock on LPC54102</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Problem-with-PLL-clock-on-LPC54102/m-p/552647#M14427</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/thread/432979"&gt;https://community.nxp.com/thread/432979&lt;/A&gt;‌ is the solution to this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Aug 2016 21:20:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Problem-with-PLL-clock-on-LPC54102/m-p/552647#M14427</guid>
      <dc:creator>gossamer69</dc:creator>
      <dc:date>2016-08-25T21:20:38Z</dc:date>
    </item>
  </channel>
</rss>

