<?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>Kinetis MicrocontrollersのトピックRe: The frequency of MK60 twice low then expected</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/The-frequency-of-MK60-twice-low-then-expected/m-p/252143#M7189</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nataliya,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On the Kinetis devices with a DDR controller, there is a fixed divide by 2 from the PLL VCO frequency that I think you aren't taking into account. Here's the PLL section of the MCG block diagram:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="PLL.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/40451i3791A1C1BD44C235/image-size/large?v=v2&amp;amp;px=999" role="button" title="PLL.png" alt="PLL.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Notice the /2 block on the right side.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So to clock the core at 150MHz you do actually want a VDIV of 36 :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;25MHz * (36/3) /2 = 150 MHz MCGCLKOUT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Melissa&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 15 Aug 2013 15:35:24 GMT</pubDate>
    <dc:creator>melissa_hunter</dc:creator>
    <dc:date>2013-08-15T15:35:24Z</dc:date>
    <item>
      <title>The frequency of MK60 twice low then expected</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/The-frequency-of-MK60-twice-low-then-expected/m-p/252142#M7188</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm creating the project with MK60FN1M0VLQ15. I use external clock 25MHz.&lt;/P&gt;&lt;P&gt;When I move from PEI mode to PEE mode 150 MHz, I have got MCGCLKOUT 75 MHz (on TRACE_CLKOUT 18,8 MHz, on FB_CLK 25MHz).&lt;/P&gt;&lt;P&gt;But I've expected 150 MHz.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MCGCLKOUT=25 MHz*18/3&lt;/P&gt;&lt;P&gt;VDIV0=0x02 (18), PRDIV=0x02 (3).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I have got 150 MHz only when VDIV0=0x14 (36). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is it? An error in datasheat or my error?&lt;/P&gt;&lt;P&gt;Please, help me to find a mistake!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This my code:&lt;/P&gt;&lt;P&gt;&amp;nbsp; MCG_C2 = 0; &lt;BR /&gt;&amp;nbsp; MCG_C1 = MCG_C1_CLKS(2) | MCG_C1_FRDIV(3);&lt;BR /&gt;&amp;nbsp; /* if we aren't using an osc input we don't need to wait for the osc to init */&lt;BR /&gt;&amp;nbsp;&amp;nbsp; MCG_C5 = 0;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; MCG_C5 = MCG_C5_PRDIV(2)|MCG_C5_PLLCLKEN_MASK;&lt;BR /&gt;&amp;nbsp; while (MCG_S &amp;amp; MCG_S_IREFST_MASK){}; // wait for Reference clock Status bit to clear&lt;/P&gt;&lt;P&gt;&amp;nbsp; while (((MCG_S &amp;amp; MCG_S_CLKST_MASK) &amp;gt;&amp;gt; MCG_S_CLKST_SHIFT) != 0x2){}; // Wait for clock status bits to show clock source is ext ref clk&lt;/P&gt;&lt;P&gt;// Now in FBE&lt;/P&gt;&lt;P&gt;&amp;nbsp; // Ensure MCG_C6 is at the reset default of 0. LOLIE disabled, PLL disabled, clk monitor disabled, PLL VCO divider is clear&lt;BR /&gt;&amp;nbsp; MCG_C6 = 0x0;&lt;/P&gt;&lt;P&gt;// Set system options dividers 150 МГц&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //MCG=PLL, core = MCG, bus = MCG/2, FlexBus = MCG/3, Flash clock= MCG/6&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set_sys_dividers(0,1,2,5);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Set the VCO divider and enable the PLL , LOLIE=0, PLLS=1, CME=0, VDIV=18&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MCG_C6 = MCG_C6_PLLS_MASK | MCG_C6_VDIV(0x2); //M = 18&amp;nbsp; R =3 mcgoutclk=fext*m/r&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pll_freq = 150;&lt;BR /&gt;&amp;nbsp; while (!(MCG_S &amp;amp; MCG_S_PLLST_MASK)){}; // wait for PLL status bit to set&lt;/P&gt;&lt;P&gt;&amp;nbsp; while (!(MCG_S &amp;amp; MCG_S_LOCK_MASK)){}; // Wait for LOCK bit to set&lt;BR /&gt;// Now running PBE Mode&lt;BR /&gt;// Transition into PEE by setting CLKS to 0&lt;BR /&gt;// CLKS=0, FRDIV=3, IREFS=0, IRCLKEN=0, IREFSTEN=0&lt;BR /&gt;&amp;nbsp; MCG_C1 &amp;amp;= ~MCG_C1_CLKS_MASK;&lt;/P&gt;&lt;P&gt;// Wait for clock status bits to update&lt;BR /&gt;&amp;nbsp; while (((MCG_S &amp;amp; MCG_S_CLKST_MASK) &amp;gt;&amp;gt; MCG_S_CLKST_SHIFT) != 0x3){};&lt;/P&gt;&lt;P&gt;// Now running PEE Mode&lt;BR /&gt;&amp;nbsp; MCG_C2|=0X80;// генерируется сброс при потере внешнего clk&lt;BR /&gt;return pll_freq;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Aug 2013 11:52:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/The-frequency-of-MK60-twice-low-then-expected/m-p/252142#M7188</guid>
      <dc:creator>nataliyadoni</dc:creator>
      <dc:date>2013-08-13T11:52:57Z</dc:date>
    </item>
    <item>
      <title>Re: The frequency of MK60 twice low then expected</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/The-frequency-of-MK60-twice-low-then-expected/m-p/252143#M7189</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nataliya,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On the Kinetis devices with a DDR controller, there is a fixed divide by 2 from the PLL VCO frequency that I think you aren't taking into account. Here's the PLL section of the MCG block diagram:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="PLL.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/40451i3791A1C1BD44C235/image-size/large?v=v2&amp;amp;px=999" role="button" title="PLL.png" alt="PLL.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Notice the /2 block on the right side.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So to clock the core at 150MHz you do actually want a VDIV of 36 :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;25MHz * (36/3) /2 = 150 MHz MCGCLKOUT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Melissa&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Aug 2013 15:35:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/The-frequency-of-MK60-twice-low-then-expected/m-p/252143#M7189</guid>
      <dc:creator>melissa_hunter</dc:creator>
      <dc:date>2013-08-15T15:35:24Z</dc:date>
    </item>
    <item>
      <title>Re: The frequency of MK60 twice low then expected</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/The-frequency-of-MK60-twice-low-then-expected/m-p/252144#M7190</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Melissa,&lt;/P&gt;&lt;P&gt;Thank you for help. You are absolutly right. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Aug 2013 10:09:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/The-frequency-of-MK60-twice-low-then-expected/m-p/252144#M7190</guid>
      <dc:creator>nataliyadoni</dc:creator>
      <dc:date>2013-08-16T10:09:44Z</dc:date>
    </item>
  </channel>
</rss>

