<?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: LPC54618 System PLL Registers in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54618-System-PLL-Registers/m-p/1163606#M42483</link>
    <description>&lt;P&gt;Hello Evan,&lt;/P&gt;
&lt;P&gt;I understand that you may prefer not to install additional tools or IDEs, but it is the easiest way to setup the PLLs for your application, albeit not the only one.&lt;/P&gt;
&lt;P&gt;If you are open to a compromise you may install the MXUXpresso Config Tools as stand alone so that you can use the Clocks Config Tool, which makes the process much less cumbersome.&lt;/P&gt;
&lt;P&gt;Alternatively, if you rather not install any additional software at all, you may use the web version of the Clock Config Tool to aid on the setup of the PLL registers.&lt;/P&gt;
&lt;P&gt;Go to the MXUCpresso Builder homepage (link below) and after selecting your board you may build the MCUXpresso SDK or explore the Pins Tool and Clocks Tool on the web.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://mcuxpresso.nxp.com/en/select" target="_blank"&gt;https://mcuxpresso.nxp.com/en/select&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="MCUXpresso_Clock.jpg" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/126843iA8A48EE7EDB1FA1B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MCUXpresso_Clock.jpg" alt="MCUXpresso_Clock.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope that this information helps!&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Gustavo&lt;/P&gt;</description>
    <pubDate>Tue, 06 Oct 2020 19:39:29 GMT</pubDate>
    <dc:creator>gusarambula</dc:creator>
    <dc:date>2020-10-06T19:39:29Z</dc:date>
    <item>
      <title>LPC54618 System PLL Registers</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54618-System-PLL-Registers/m-p/1163052#M42466</link>
      <description>&lt;P&gt;I am having a great deal of trouble setting the multiply / divide registers for the System PLL clock, specifically the MDEC register, SYSPLLCTRL, SYSPLLMDEC, SYSPLLNDEC, and SYSPLLPDEC.&lt;/P&gt;&lt;P&gt;The function "BOARD_BootClockPLL180M" in the SDK sets the boot clock to 180MHz, and uses the interal 12MHz FRO as the input to the system PLL, and sets MDEC, NDEC, and PDEC, using hard-coded values: 8191, 770, and 98 respectively.&amp;nbsp;&lt;/P&gt;&lt;P&gt;There is pseudo-code provided in the reference manual for calculating the MDEC register value, but when I try to calculate it, I get a different number than what is in the example in the SDK.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Looking for help because I would like to generate a 144MHz boot clock from the System PLL, but I cannot decipher this section of the reference manual. Would prefer &lt;STRONG&gt;NOT installing MCUXpresso&lt;/STRONG&gt; or any software tools. Just looking for how these register values are actually calculated.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your help,&lt;/P&gt;&lt;P&gt;Evan&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;--UPDATE--&lt;/P&gt;&lt;P&gt;I realize this is over a year later, but I just remembered this and wanted to leave it out there for anyone who may need it in the future! Messing around a bit, I found a way to encode the MDEC register value for any given multiplier M and made a handy function for doing so. Cheers!&lt;/P&gt;&lt;P&gt;uint32_t EncodeMDEC(uint16_t M)&lt;BR /&gt;{&lt;BR /&gt;uint32_t x, MDEC = 0;&lt;BR /&gt;&lt;BR /&gt;/* Find MDec */&lt;BR /&gt;switch (M)&lt;BR /&gt;{&lt;BR /&gt;case 0:&lt;BR /&gt;MDEC = 0x1FFFF;&lt;BR /&gt;break;&lt;BR /&gt;case 1:&lt;BR /&gt;MDEC = 0x18003;&lt;BR /&gt;break;&lt;BR /&gt;case 2:&lt;BR /&gt;MDEC = 0x10003;&lt;BR /&gt;break;&lt;BR /&gt;default:&lt;BR /&gt;x = 0x04000UL;&lt;BR /&gt;//uint32_t m = 0xFFFFFFFFUL;&lt;BR /&gt;for (uint32_t i = 0x8000; i &amp;gt;= 3UL; i--)&lt;BR /&gt;{&lt;BR /&gt;x = (((x ^ (x &amp;gt;&amp;gt; 1UL)) &amp;amp; 1UL) &amp;lt;&amp;lt; 14UL) | ((x &amp;gt;&amp;gt; 1UL) &amp;amp; 0x3FFFUL);&lt;BR /&gt;if(i == M)&lt;BR /&gt;{&lt;BR /&gt;MDEC = (x &amp;amp; 0x1FFFF);&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;break;&lt;BR /&gt;}&lt;BR /&gt;return MDEC;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Oct 2021 18:45:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54618-System-PLL-Registers/m-p/1163052#M42466</guid>
      <dc:creator>evan_ohlsen</dc:creator>
      <dc:date>2021-10-18T18:45:32Z</dc:date>
    </item>
    <item>
      <title>Re: LPC54618 System PLL Registers</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54618-System-PLL-Registers/m-p/1163606#M42483</link>
      <description>&lt;P&gt;Hello Evan,&lt;/P&gt;
&lt;P&gt;I understand that you may prefer not to install additional tools or IDEs, but it is the easiest way to setup the PLLs for your application, albeit not the only one.&lt;/P&gt;
&lt;P&gt;If you are open to a compromise you may install the MXUXpresso Config Tools as stand alone so that you can use the Clocks Config Tool, which makes the process much less cumbersome.&lt;/P&gt;
&lt;P&gt;Alternatively, if you rather not install any additional software at all, you may use the web version of the Clock Config Tool to aid on the setup of the PLL registers.&lt;/P&gt;
&lt;P&gt;Go to the MXUCpresso Builder homepage (link below) and after selecting your board you may build the MCUXpresso SDK or explore the Pins Tool and Clocks Tool on the web.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://mcuxpresso.nxp.com/en/select" target="_blank"&gt;https://mcuxpresso.nxp.com/en/select&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="MCUXpresso_Clock.jpg" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/126843iA8A48EE7EDB1FA1B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MCUXpresso_Clock.jpg" alt="MCUXpresso_Clock.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope that this information helps!&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Gustavo&lt;/P&gt;</description>
      <pubDate>Tue, 06 Oct 2020 19:39:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54618-System-PLL-Registers/m-p/1163606#M42483</guid>
      <dc:creator>gusarambula</dc:creator>
      <dc:date>2020-10-06T19:39:29Z</dc:date>
    </item>
  </channel>
</rss>

